SUMIF with non-adjancent cells

I

ismae

No, I mean when the "range" and "sum_range" contain non-adjacent cells. For
example, I want to sum from cells C5,G5,K5,O5,.....,AI5 only the ones with
positive values. I tried the formula

=SUMIF((C5,G5,K5,O5,S5,W5,AA5,AE5,AI5),">0",(C5,G5,K5,O5,S5,W5,AA5,AE5,AI5))

but it returns #VALUE!
 
T

T. Valko

I want to sum from cells C5,G5,K5,O5,.....,AI5
only the ones with positive values.

Try this:

=SUMPRODUCT(--(MOD(COLUMN(C5:AI5)+1,4)=0),--(C5:AI5>0),C5:AI5)
 

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