A very simple conditional formatting question

M

Mel

Excel 2003

I want cell G4 conditionally formatted if a zero (0) is entered, but
no action if left blank. To simply program "G4=0" formats the cell
when empty because zero and null evaluated as the same? But when I use
this formula it works...

=AND(G4<>"",G4=0)

So, is this the recommended hoop to jump through to make it work or is
there a better way?

Thanks,
Melina
 
S

Shane Devenshire

Hi,

Your title is conditional formatting but you aren't doing conditional
formatting. If you are then the formula in conditional formatting should be

=AND(A1<>"",A1=0)

Second question - is null and 0 the same. In most cases yes but not all
cases. the following formula returns #NULL! =A1:A10 B1:B10 which is not
equal to 0.

I realize that this is an obscure point, but...
 
T

T. Valko

You're welcome!

--
Biff
Microsoft Excel MVP


Thanks, Biff.

'Just wanted to be sure I missed anything. <g>

-Melina
 

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