Forum Discussion
bcsteeve
Jan 04, 2024Copper Contributor
Office Scripts in Excel: Can I have a button in worksheet 1 that updates a cell in worksheet 2?
This may be trivial, this may be impossible. I was only made aware of the existence of Office Scripts yesterday and I really have no idea of their capability. I was trying to look through some samp...
- Jan 04, 2024
Copying a value from one cell to another is quite simple. This copies the value of cell A1 on Sheet1 to cell E1 on Sheet2:
function main(workbook: ExcelScript.Workbook) { workbook.getWorksheet("Sheet2").getRange("E1").setValue(workbook.getWorksheet("Sheet1").getRange("A1").getValue()); }
JKPieterse
Jan 04, 2024Silver Contributor
Copying a value from one cell to another is quite simple. This copies the value of cell A1 on Sheet1 to cell E1 on Sheet2:
function main(workbook: ExcelScript.Workbook) {
workbook.getWorksheet("Sheet2").getRange("E1").setValue(workbook.getWorksheet("Sheet1").getRange("A1").getValue());
}
bcsteeve
Jan 04, 2024Copper Contributor
Very good, thank you Jan.