• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

SumIf Help [SOLVED]

Ri0

New Member
I have a simple problem.

Say I have a range of cells with some numbers B1:D1

I want to only add the cells if the cells below contain a number B2:D2

I know I can write a simple formula =If(B2<>0,B1,0)+If(C2<>0,C1,0)...

That gets to be too long if my range is B1:Z1!


I know there has to be a simple solution with sumif and maybe sumproduct, but I am stumped. I look forward to any help. Thanks!
 
=sumif(a1:z1,A2:z2,">"&A3)


Will sum up row 1 where row 2 > cell A3
 
Hi ,


The following SUMIF will work , provided the only possibilities in row 2 are either the cells are blank , or they have numbers in them.


=SUMIF(B2:Z2,"<>",B1:Z1)


Narayan
 
Narayan, that's it! I knew it was simple, but my brain doesn't want to work today.

Mark this as solved!
 
Back
Top