My wife and I are exploring if we can afford to have her quit her job to stay home with the kids. I am building a spread sheet to see who spent what in 2024. My formula to sort the transactions is rather redundant and I assume there is an easier way to write this formula.
All the the transactions are on another page called 2024. A1 cell has 2024. The idea being that when I go to another year I can just duplicate this page and change A1 to the other year and everything will update itself. The INDIRECT just allows me to call specific ranges in another sheet. So the FILTERs will filter the transactions down by category B2 and then by the specific accounts (mine or hers) that are listed in the Data Keeper page. So the filters will filter down by those 2 things and then return the amounts of those transactions and then sum them up. I was playing with a way to use just one FILTER but I couldn't figure it out.
I would also prefer a better way to call the 'Data Keeper'!$A$2 accounts so that I can add or remove accounts in the future without having to update all the formulas.
B2:6 is the Transaction category. My real one has dozens of categories.
Here's a simple copy I made to play with:https://docs.google.com/spreadsheets/d/1qUS1gYdECT96Vjdjl1RFLvao8CW2c9LlVGsJfbj51Y4/edit?usp=sharing
=SUM(IFNA(FILTER(INDIRECT($A$1&"!$D:$D"),INDIRECT($A$1&"!$C:$C")=$B2,INDIRECT($A$1&"!$E:$E")='Data Keeper'!$A$2)),IFNA(FILTER(INDIRECT($A$1&"!$D:$D"),INDIRECT($A$1&"!$C:$C")=$B2,INDIRECT($A$1&"!$E:$E")='Data Keeper'!$A$3)),IFNA(FILTER(INDIRECT($A$1&"!$D:$D"),INDIRECT($A$1&"!$C:$C")=$B2,INDIRECT($A$1&"!$E:$E")='Data Keeper'!$A$4)),IFNA(FILTER(INDIRECT($A$1&"!$D:$D"),INDIRECT($A$1&"!$C:$C")=$B2,INDIRECT($A$1&"!$E:$E")='Data Keeper'!$A$5)),IFNA(FILTER(INDIRECT($A$1&"!$D:$D"),INDIRECT($A$1&"!$C:$C")=$B2,INDIRECT($A$1&"!$E:$E")='Data Keeper'!$A$6)))