Hello,
I am trying to setup a worksheet with two sheets, one that has a "Jobs" sheet and one with a "Completed Jobs" sheet. On the "Jobs" sheet I will have rows of data and the column at the end will have a dropdown menu with a "Complete" option. I want a user to be able to select the "Complete" option and Excel automatically moves that row over to the "Completed Jobs" sheet.
I am using the web app as this is for multiple users so I need to use Office Scripts.
@skillilea got me started with some basic code (thank you skillilea) but I need to figure out the rest of the code to get it to work
I am trying to setup a worksheet with two sheets, one that has a "Jobs" sheet and one with a "Completed Jobs" sheet. On the "Jobs" sheet I will have rows of data and the column at the end will have a dropdown menu with a "Complete" option. I want a user to be able to select the "Complete" option and Excel automatically moves that row over to the "Completed Jobs" sheet.
I am using the web app as this is for multiple users so I need to use Office Scripts.
@skillilea got me started with some basic code (thank you skillilea) but I need to figure out the rest of the code to get it to work
JavaScript:
function main(workbook: ExcelScript.Workbook) {
let sourceSheet = workbook.getWorksheet("Sheet1");
let targetSheet = workbook.getWorksheet("Sheet2");
let sourceRange = sourceSheet.getRange("A1:C10");
let valuesToTransfer = sourceRange.getValues();
let targetRange = targetSheet.getRange("A1");
targetRange.setValues(valuesToTransfer);
}