Hi there,
I've been using a very simple macro in excel to tally the number of enquiries we answer on certain topics. I have a range of buttons labelled 'Access Query', 'Directional Query', 'IT Query' etc. each using a version of this macro;
Sub Button1_Click()
Range("A1") = Range("A1") + 1
End Sub
so that every time I answer an enquiry, I click the corresponding button and the cell increases by one.
It would now be useful to have multiple people access the sheet at the same time so we're moving to excel online which won't run the macro so I'm trying to work out how to use office scripts to do the same thing.
so far I've got to;
function main(workbook: ExcelScript.Workbook) {
let sheet = workbook.getWorksheet("22.09.23");
sheet.getRange("A1").setValue("=SUM(A1+1)")}
but A1 always equals 0 - it's not +1ing.
I've been using a very simple macro in excel to tally the number of enquiries we answer on certain topics. I have a range of buttons labelled 'Access Query', 'Directional Query', 'IT Query' etc. each using a version of this macro;
Sub Button1_Click()
Range("A1") = Range("A1") + 1
End Sub
so that every time I answer an enquiry, I click the corresponding button and the cell increases by one.
It would now be useful to have multiple people access the sheet at the same time so we're moving to excel online which won't run the macro so I'm trying to work out how to use office scripts to do the same thing.
so far I've got to;
function main(workbook: ExcelScript.Workbook) {
let sheet = workbook.getWorksheet("22.09.23");
sheet.getRange("A1").setValue("=SUM(A1+1)")}
but A1 always equals 0 - it's not +1ing.