1

I'm trying to use Google's monthly budget template and alter it so I can get a full view of the year. I have tabs Jan-Dec made but I can't figure out how to add them to the below formula. When I try, it tells me that the IF can only use 3. The areas Expenses and Income in the screenshot should total up the Amounts (column C) with their respective category (Column E).

The same would be said for income using Columns H and J.

=if(isblank($B36), "", sumif(January!$E:$E,$B36,January!$C:$C))

Here is the link to my sheet https://docs.google.com/spreadsheets/d/1MTL3xdN-0W4vS7e_yO1C4qkFAxlsxhx3SLXyml78qOc/edit?usp=sharing

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124
Brooke Taylor
  • 131
  • 2
  • 3
  • 11

2 Answers2

4

delete E28:E41 and try in E28:

=BYROW(B28:B41, LAMBDA(b, IF(b="",,
 IFERROR(QUERY({January!C:E; February!C:E; March!C:E; 
 April!C:E; May!C:E; June!C:E; July!C:E; August!C:E;
 September!C:E; October!C:E; November!C:E; December!C:E}, 
 "select sum(Col1) where Col3 = '"&b&"' label sum(Col1)''", ), 0))))

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124
  • That suggestion did not work. There are errors regarding parentheses and no closing arguments. I have updated my question with the link to my sheet as well as a screenshot of where this is supposed to take place. I also updated what I'm trying to do. Hopefully that helps? – Brooke Taylor Dec 29 '22 at 01:23
  • 1
    That worked! Thank you. Last question, I'm assuming I can use this same code for the Income section correct? Just change the B28 to H28 and C:E to be H:J? Or is there anything else I need to change? – Brooke Taylor Dec 29 '22 at 16:41
  • 1
    @BrookeTaylor yes you are correct – player0 Dec 29 '22 at 17:25
2

Update:

In order to make it cover the whole range of Categories with the same principle of having the flexibility of a list of Sheets' Names, you can use this formula:

=INDEX(IF(ISBLANK(B28:B41),"",REDUCE(,A28:A,LAMBDA(a,sh,
a+SUMIF(INDIRECT(sh&"!$E:$E"),B28:B41,INDIRECT(sh&"!$C:$C"))))))

I've set it in your sheet too in a new column to the right


If you stablish a list of sheets' names in a range, you can use this formula:

=if(isblank($B36),"",REDUCE(,A2:A,LAMBDA(a,sh,
a+SUMIF(INDIRECT(sh&"!$E:$E"),$B36,INDIRECT(sh&"!$C:$C")))))

enter image description here

Martín
  • 7,849
  • 2
  • 3
  • 13
  • That suggestion did not work. I have updated my question with the link to my sheet as well as a screenshot of where this is supposed to take place. I also updated what I'm trying to do. Hopefully that helps? – Brooke Taylor Dec 29 '22 at 01:24
  • Updated my answer too! – Martín Dec 29 '22 at 04:10