Referencing Black Cells

  • Thread starter Comcast News Reader
  • Start date
C

Comcast News Reader

What's the correct syntax in functions for referencing blank cells?

Here's a partial function I'm trying to write:

=IF(AND(E20="",D<=DATE(2003,7,1))

With E20="" I'm attempting to reference occurances of blank or empty cells.
Is that syntax correct?
 
H

Harlan Grove

Comcast News Reader said:
What's the correct syntax in functions for referencing blank cells?

Here's a partial function I'm trying to write:

=IF(AND(E20="",D<=DATE(2003,7,1))
....

Depends what you mean by 'blank'. If you mean no contents whatsoever, then
ISBLANK(E20) is safest. If you mean no contents or evaluating to zero length
strings (""), then your E20="" is best.
 
C

Comcast News Reader

That helps. Thank you very much!


Harlan Grove said:
...

Depends what you mean by 'blank'. If you mean no contents whatsoever, then
ISBLANK(E20) is safest. If you mean no contents or evaluating to zero length
strings (""), then your E20="" is best.
 
D

David McRitchie

A little more detail.

E20="" will include blank and cells with length = 0,
which is what you asked in the text of your message..

ISBLANK(E20) would include only empty cells

TRIM(E20)="" would include empty, length =0 and cells with only spaces

E20 =" " would test TRUE for a single space: and would test FALSE
an empty cell, a zero length string, more than one space.

Cells with formulas would never test as blank , but can be tested
for the other possibilities.

Your reference to D was probably meant to be D20
Subject indicates Black instead of Blank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top