Home > Mobile >  How can you add more sheet tabs to existing IF/SumIF Google Sheet formula?
How can you add more sheet tabs to existing IF/SumIF Google Sheet formula?

Time:12-29

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 enter image description here

CodePudding user response:

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

CodePudding user response:

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

  • Related