S srikandi2000 Member Sep 27, 2013 #1 [SOLVED] Dear All, I have been trying to modify Narayank991 solution to my previous problem to make -sumifs- sums for more than one columns to no avail. Can anyone propose a solution for this? Thanks in advance. Attachments example for chandoo.org.xlsx 9.4 KB · Views: 85
[SOLVED] Dear All, I have been trying to modify Narayank991 solution to my previous problem to make -sumifs- sums for more than one columns to no avail. Can anyone propose a solution for this? Thanks in advance.
N NARAYANK991 Excel Ninja Sep 27, 2013 #2 Hi , Do you mean to say that instead of summing one column ( column C ) , you now want to sum both column C and column D ? Narayan
Hi , Do you mean to say that instead of summing one column ( column C ) , you now want to sum both column C and column D ? Narayan
Xiq Active Member Sep 27, 2013 #3 Hi Srikandi, Do you want to have both columns being summed up? Or an option to select either column C or D? If the first, can't you use a subtotal column of number of teachers and base your formula on that column?
Hi Srikandi, Do you want to have both columns being summed up? Or an option to select either column C or D? If the first, can't you use a subtotal column of number of teachers and base your formula on that column?
Xiq Active Member Sep 27, 2013 #4 See attached file Attachments example for chandoo.org.xlsx 9.7 KB · Views: 73
S srikandi2000 Member Sep 27, 2013 #5 I want to have both columns being summed up with just one formula (without using sumifs() + sumifs()) EDIT: adding subtotal columns is a nice solution, but is it possible to use a formula?
I want to have both columns being summed up with just one formula (without using sumifs() + sumifs()) EDIT: adding subtotal columns is a nice solution, but is it possible to use a formula?
N NARAYANK991 Excel Ninja Sep 27, 2013 #6 Hi , A search on the internet says it's not possible ; instead of SUMIF or SUMIFS , use SUM(IF(...)) entered as an array formula. In your case , the formula would be : =SUM(IF($A$2:$A$12=IF($H$1="All",$A$2:$A$12,$H$1),IF($B$2:$B$12=IF($H$2="All",$B$2:$B$12,$H$2),$C$2:$D$12))) entered as an array formula , using CTRL SHIFT ENTER. Narayan
Hi , A search on the internet says it's not possible ; instead of SUMIF or SUMIFS , use SUM(IF(...)) entered as an array formula. In your case , the formula would be : =SUM(IF($A$2:$A$12=IF($H$1="All",$A$2:$A$12,$H$1),IF($B$2:$B$12=IF($H$2="All",$B$2:$B$12,$H$2),$C$2:$D$12))) entered as an array formula , using CTRL SHIFT ENTER. Narayan
S srikandi2000 Member Sep 27, 2013 #7 My gosh.... I've been trying to do that for an hour already... never crosses my mind to add the IF directly in an IF logical. Thanks a lot Narayank991..
My gosh.... I've been trying to do that for an hour already... never crosses my mind to add the IF directly in an IF logical. Thanks a lot Narayank991..
Xiq Active Member Sep 27, 2013 #8 Ah, Narayan is again quicker then me Nevertheless, here is mine: Code: =SUMPRODUCT(($A$2:$A$12=IF($H$1="All",$A$2:$A$12,$H$1))*($B$2:$B$12=IF($H$2="All",$B$2:$B$12,$H$2)),$C$2:$C$12+$D$2:$D$12) No use for array entering
Ah, Narayan is again quicker then me Nevertheless, here is mine: Code: =SUMPRODUCT(($A$2:$A$12=IF($H$1="All",$A$2:$A$12,$H$1))*($B$2:$B$12=IF($H$2="All",$B$2:$B$12,$H$2)),$C$2:$C$12+$D$2:$D$12) No use for array entering
S srikandi2000 Member Sep 27, 2013 #9 Wow... I really need to learn excel from the basic again. I like your non array approach.
H Haseeb A Active Member Sep 28, 2013 #10 OR, SUMIFS with OFFSET is possible SUM multiple columns. even columns are non-continuous =SUMPRODUCT(SUMIFS(OFFSET($C$2:$C$12,0,{0,1}),$A$2:$A$12,IF($H$1="All","*",$H$1),$B$2:$B$12,IF($H$2="All","*",$H$2)))
OR, SUMIFS with OFFSET is possible SUM multiple columns. even columns are non-continuous =SUMPRODUCT(SUMIFS(OFFSET($C$2:$C$12,0,{0,1}),$A$2:$A$12,IF($H$1="All","*",$H$1),$B$2:$B$12,IF($H$2="All","*",$H$2)))