Sum Count of Criteria Every 3rd Row

  • Thread starter Sam via OfficeKB.com
  • Start date
S

Sam via OfficeKB.com

Hi All,

I would like to Sum the Count of numerical values in Every 3rd Row BUT ONLY
IF the value(s) equals a specific criteria.

Example:
Sum Count of Every 3rd Row that has a value of 50. The criteria will vary.

Cheers,
Sam
 
G

Guest

if I read your question right you want to sum the occurances of 50, but only
those in every 3rd row.

So, for the range of a1:a10, summing those 50's in rows 1,4,7,10

=SUMPRODUCT((A1:A10=50)*(MOD(ROW(A1:A10)-1,3)=0)*(A1:A10))

you could refer to cells with the values of 50 and 3 in the formula if
desired vs the hard coding of the values in the formula
 
D

Domenic

Assuming that A1:A100 contains your data, to count every third row,
starting with the first cell in the range, try...

=SUMPRODUCT(--(MOD(ROW(A1:A100)-ROW(A1)+0,3)=0),--(A1:A100=B1))

....where B1 contains your criteria. To count every third row, starting
with the third cell in the range or the first occurrence of third,
change the +0 bit to +1.

Hope this helps!
 
S

Sam via OfficeKB.com

Hi Duane,

Thank you for reply. I've tried the solution below, but do not get the
expected answer. Not sure why?
=SUMPRODUCT((A1:A10=50)*(MOD(ROW(A1:A10)-1,3)=0)*(A1:A10))

Cheers,
Sam
if I read your question right you want to sum the occurances of 50, but only
those in every 3rd row.

So, for the range of a1:a10, summing those 50's in rows 1,4,7,10

=SUMPRODUCT((A1:A10=50)*(MOD(ROW(A1:A10)-1,3)=0)*(A1:A10))

you could refer to cells with the values of 50 and 3 in the formula if
desired vs the hard coding of the values in the formula
[quoted text clipped - 6 lines]
Cheers,
Sam
 
S

Sam via OfficeKB.com

Hi Domenic,

Thank you for reply. The Formula works Great!
=SUMPRODUCT(--(MOD(ROW(A1:A100)-ROW(A1)+0,3)=0),--(A1:A100=B1))

Cheers,
Sam

Assuming that A1:A100 contains your data, to count every third row,
starting with the first cell in the range, try...

=SUMPRODUCT(--(MOD(ROW(A1:A100)-ROW(A1)+0,3)=0),--(A1:A100=B1))

...where B1 contains your criteria. To count every third row, starting
with the third cell in the range or the first occurrence of third,
change the +0 bit to +1.

Hope this helps!
[quoted text clipped - 6 lines]
Cheers,
Sam
 
G

Guest

Hi,

Try the following array formula (Ctrl+Shift+Enter). Assume your data is in
range A13:A17

23
34
56
45
34

In A19, enter the following array formula (Ctrl+Shift+Enter)

=SUM(IF((MOD(ROW(A13:A17),2)=0*(A13:A17>4)),$A$13:$A$17,0))

The result of this will be 79.

If you have any problems please feel freet o contact me at
(e-mail address removed)

Regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top