Ignore blank cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
=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)
 
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
 
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)
 
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
 
Back
Top