SUM.IF multiple columns when first column is 0

Solari

New Member
Joined
Jun 1, 2018
Messages
16
Hi!

I have a working SUM.IF that looks at a range of 3 columns and returns a single columns sum if the combined sum is larger than 0.
The formula only works if there is numbers in the first column!

Example:
=IF(SUM.IF(Data_sheet!$H:$H;Sum_sheet!L$3;Data_sheet!$K:$M)>0;SUM.IF(Data_sheet!$H:$H;Sum_sheet!L$3;Data_sheet!$L:$L);Other_sheet!J15)
L3 contain the month as does column H in Data_sheet. That is not the problem.

Data_sheet contains the numbers, but in this case only columns L and M has numbers, K is only zeroes.
If I manually input a single 1 in column K the formula works for L and M...

What am I doing wrong?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Because the criteria range is only 1 column ($H:$H) only the first column of the sum range (column K) is evaluated. For sumif to work correctly the sum and criteria range must be equal in size.

You would either need to use a sumproduct formula, or sumif on each individual column then add them together.

Excel Formula:
=IF((SUMIF(Data_sheet!$H:$H;Sum_sheet!L$3;Data_sheet!$K:$K)+SUMIF(Data_sheet!$H:$H;Sum_sheet!L$3;Data_sheet!$L:$L)+SUMIF(Data_sheet!$H:$H;Sum_sheet!L$3;Data_sheet!$M:$M))>0;SUMIF(Data_sheet!$H:$H;Sum_sheet!L$3;Data_sheet!$K:$K)+SUMIF(Data_sheet!$H:$H;Sum_sheet!L$3;Data_sheet!$L:$L)+SUMIF(Data_sheet!$H:$H;Sum_sheet!L$3;Data_sheet!$M:$M);Other_sheet!J15)
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top