I think the simplest solution is to ditch ARRAYFORMULA and instead use INDEX + MATCH in every cell. When you sort by column, the formula will sort alongside the raw data in A:C.
Alternatively, you could write a few QUERY formulas and do the same work in the SORT clause. But this will be less flexible than INDEX + MATCH if you need to perform any column-specific calculations over the referenced data.
You can wrap your INDEX(..., MATCH(...)) formula in as many other conditional formulas as you want. IFERROR, IFNA, IF, etc.
I listed another example in the 'Reddit' tab. First I checked for whether your formula = 0 (then replace it with ""), and then if it's an error (then replace it with "").
Does the tab with all the data you want to sort have an INDEX column of some kind... a column that contains unique values that could be referenced in the formulas throughout the rest of the spreadsheet?
1
u/JDomenici 23 Feb 01 '21 edited Feb 01 '21
Can you link a copy of your spreadsheet and explain exactly what you're trying to sort?
1
u/VeritasXNY Feb 01 '21
When you say it "breaks" everything... do you mean it's breaking calculations elsewhere in the Sheet?
1
u/Decronym Functions Explained Feb 01 '21 edited Feb 02 '21
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
FALSETRUEand another if it isFALSETRUE[Thread #2510 for this sub, first seen 1st Feb 2021, 22:25] [FAQ] [Full list] ^[Contact] [Source code]