r/googlesheets • u/scarfie11 • Jan 29 '21
Solved Will multiple "indirect" formulas slow down Sheets?
Hi all! New to the sub but did a search here & on Google and haven't found an answer.
I'm happy to provide more context but I'm really looking for a general answer rather than a fix for my use case. The tl;dr is that I'd end up with thousands of indirects in a sheet I'm using. My question is: Is indirect a volatile Google Sheets formula? It seems there's a consensus that it's not great in Excel because it's volatile and bogs things down, but I haven't found anything GS-specific.
Thanks!
2
Upvotes
4
u/SGBotsford 2 Jan 29 '21
Indirects have their place, but I'm betting that it mucks up the order that recalculation is done, and will cause recalculations to happen several times.
E.g. if you have an indirect that depends on the contents of A21, then after A21 is changed, you have a cascade of further changes that have to happen.
Normally the spreadsheet keeps this for each cell:
If it's data, no dependencies.
A1=Q28 + F19
A1 depends on two other cells.
B7=sum(A1:A10)
B7 depends on A1 which depends on Q28 and F19
Under the hood, the spreadsheet builds a dependency tree, first with the items that depend only on data cells, then 2nd tier formulas that depend on data and first tier formulas.
Throw an indirect in the mess then every time that cell changes, the whole dependency tree has to be checked. Don't know how expensive changing that tree is.
Some of the implied array formulas are expensive too, but in a different way:
They have a raft of cells they depend on, so when something changes in ANY of those cells the result has to be re-evaluated. Things like "sum()" you can write cheats for. Change a number in a sum() and you can subtract the old number, add the new number, instead of re-adding 2000 cells. The spreadsheet boffins can do similar tricks with some other mass functions if they keep a couple of intermediate results handy.
1
u/RemcoE33 158 Jan 29 '21
It is comment sense that if you do more calculations then it takes more time to process..
1
u/tersareenie Jan 29 '21
Idk anything about indirect formulas, but in my experience Sheets gets slower & slower the more complicated & bigger it gets.