Ignore blank cells

A

Angyl

How do I get this formula:
=SUMPRODUCT(--(D$5:D$31-I$5:I$31<60))

To ignore empty cells? It's currently tallying all the empty ones contained
in the ranges.
 
B

Bob Phillips

=SUMPRODUCT(--($D$5:$D$31<>""),--($I$5:$I$31<>""),--((D$5:D$31-I$5:I$31)<60))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
R

Rick Rothstein \(MVP - VB\)

How do I get this formula:
=SUMPRODUCT(--(D$5:D$31-I$5:I$31<60))

To ignore empty cells? It's currently tallying all the empty ones
contained in the ranges.

Something like this maybe...

=SUMPRODUCT(--(D$5:D$31-I$5:I$31<60)*(D$5:D$31<>"")*(I$5:I$31<>""))

where you include additional logical expressions to filter those conditions.

Rick
 
A

Angyl

Beautiful, thanks Bob.

Bob Phillips said:
=SUMPRODUCT(--($D$5:$D$31<>""),--($I$5:$I$31<>""),--((D$5:D$31-I$5:I$31)<60))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
R

Rick Rothstein \(MVP - VB\)

For the format I used (multiplying the logical expressions), I could have
left off the double unary signs...

=SUMPRODUCT((D$5:D$31-I$5:I$31<60)*(D$5:D$31<>"")*(I$5:I$31<>""))

They would only be needed if you used the comma delineated listing of the
logical expressions.

Rick
 
Top