Using SUMIF with non-blank cells

P

Peter Aitken

I want to use SUMIF to sum the numbers in column G only if the adjacent cell
in column H is not empty. I cannot figure out the criterion to use.

Thanks,
 
S

Springbok

Hi Peter,

SUMIF(range,criteria,sum_range). Criteria = "<>"""

SUMIF(A:A,"<>""",B:B)

Regards,
Jon
 
S

Springbok

Sorry, that doesn't work. Do a sum of the range and then deduct the blanks:

SUM(B:B)-SUMIF(A:A,"",B:B)

Cheers,
Jon
 
P

Peter Aitken

Thanks - Jason your solution is certainly nonintuitive but it works and is
the simplest one.
 
Top