Posted 30 April 2023, 7:16 pm EST
I have a formula which should return 0 if there is an error. As you can see from the example it tries to calculate the previous column (-1) but sometime this column can be the column header which throws the error.
The same equation handles the error in Excel the way you would expect. When consoling out the formula in spread js the formuals looks fine
IFERROR(SUBTOTAL(9,OFFSET(values,SEQUENCE(1,1,0),SEQUENCE(yearTo-yearFrom+1)-1,1)),0)+IFERROR(SUBTOTAL(9,OFFSET(values,SEQUENCE(1,1,0),SEQUENCE(yearTo-yearFrom+1),1)),0)
Is there a reason why spreadjs handles this differently and if so is there a workaround?