SumIf with discontinuous cells?

rbeeman

Board Regular
Joined
Jun 10, 2005
Messages
66
I need to use the SumIF (and SumProduct) on a collection of summary row cells that have sub-component data between them and are therefore discontinuous. A comma is used to separate these values in the formula, but a comma is also used to separate the three components of the SumIf formula syntax....so it is not working. I tried putting extra parens around the range data, but still doesn't work. Any ideas?

PS...added complicating factor...I can't use a 'name the ranges' approach here (long story)
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Oaktree

MrExcel MVP
Joined
Jun 20, 2002
Messages
8,066
Office Version
  1. 365
Why not use three SUMIFs and add them together?

=SUMIF(range1,criterion,sumrange1)+SUMIF(range2,criterion,sumrange2)+SUMIF(range3,criterion,sumrange3)
 

rbeeman

Board Regular
Joined
Jun 10, 2005
Messages
66
I'm not exactly sure how that would work? What I'm trying to do is something like...

SumIf(a5,a10,a15,a20,">0",b5,b10,b15,b20)

....and this is just the denominator in a larger formula that uses same approach with SumProduct in the numerator.
 

Oaktree

MrExcel MVP
Joined
Jun 20, 2002
Messages
8,066
Office Version
  1. 365
=SUMPRODUCT(--(MOD(ROW($A$1:$A$20),5)=0),--($A$1:$A$20>0),$B$1:$B$20)
 

vane0326

Well-known Member
Joined
Aug 29, 2004
Messages
819
Maybe...


=SUMPRODUCT((MOD(ROW(A5:A20),5)=0)*(A5:A20>0),B5:B20)



Hope it helps!
 

Forum statistics

Threads
1,176,070
Messages
5,901,205
Members
434,882
Latest member
tchien69

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
Top