Search code examples
arraysgoogle-sheetsdivisioncircular-reference

Calculating simple returns (one cell divided by cell above it in same column, result in another column) across large sets of data, google sheets


I'm trying to find a way to automate a simple return calculation (one cell divided by cell above it) across a large set of data which updates/adds cells regularly without having to pull-down the formula. I can't use arrayfunction as it gives me a circular error (all data is in same column). Perhaps there is a way to "split" the column into 2 virtual arrays and then just divide those? Or, another easier way?

s

Appreciate any and all help!


Solution

  • Another solution:

    =ARRAYFORMULA(ARRAY_CONSTRAIN(A2:A/A1:A-1,COUNTA(A2:A),1))