Totaling Question Using Sum(IF

jkktx81

Board Regular
Joined
Jan 25, 2008
Messages
154
I am familier with using this type of formula to add columns if the criteria matches such as:
{=SUM(IF('2009LP'!$C$2:'2009LP'!$C$6999="JAN",IF('2009LP'!$D$2:'2009LP'!$D$6999="LP483",'2009LP'!$J$2:'2009LP'!$J$6999,0)))}

It works good for me if adding data from another main entry sheet onto a totaling sheet.

My question: If I want to use the sumif to add data from say coulmn C, but it's only every 4th cell, like C4, C8, C12, C16, C20 so on and so on, is there way to put that in the formula? Because data in the other cells I don't want to add...
 
{=SUMPRODUCT(--(DISP!E5:E73="PGEK"),--(MOD(ROW(DISP!C4:C72)-ROW(DISP!C4),4)=0),DISP!C4:C72)}

Or this didn't.
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
=SUMPRODUCT(--(DISP!E5:E25=C3),--(MOD(ROW(DISP!C4:C24)-ROW(DISP!C4),4)=0),DISP!C4:C24)

IDK what's wrong. I still get #N/A

I have PGEK in C3 just like you do...
 
Upvote 0
Once again for the help: But I'm still having trouble, let me be more specific because I'm probably not explaining well enough or I just doing something wrong. Here is actually what I'm trying to do:

Sheet names: DISP & DRVST

In DRVST: Need formula in D3 that totals from DISP column C4:C72 and thats only every 4th cell such as C4, C8, C12, C16 all the way to C72,

BUT only if DISP column E, in every 4th cell such as E5, E9, E13, E7 ALL THE WAY TO E73 has PGEK in the the cell.

On DRVST in D3 enter:

=SUMPRODUCT(--(MOD(ROW(DISP!C4:C72)-ROW(DISP!C4),4)=0),--(DISP!E4:E72="PGEK"),DISP!C4:C72)

This is equivalent to a CSE form like:

=SUM(IF(MOD(ROW(DISP!C4:C72)-ROW(DISP!C4),4)=0,IF(DISP!E4:E72="PGEK",DISP!C4:C72)))

The important thing is that this set up (the way the MOD bit is constructed) is robust against row insertions in front of the current data.
 
Upvote 0
Maybe because DISP sheet has some formulas already in for the data?
It' not standard, has some merge cells and modifications
 
Upvote 0
Maybe because DISP sheet has some formulas already in for the data?
It' not standard, has some merge cells and modifications

Having formulas in the range of interest should not be a problem, but merged cells can be troublesome. What do we get - an inaccurate result, an error value?
 
Upvote 0
Can I send you the worksheet? I took out confidential info and left just the part I'm working on...
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,787
Members
452,942
Latest member
VijayNewtoExcel

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