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)
 
Top