Help with conditional formatting syntax

P

Paul Hyett

I wonder if someone here could help?

I have a spreadsheet where I want to change the font colour of a cell
depending on the content to the cell to its immediate left - but only if
the cell to the left isn't blank.

To illustrate :

A B
1 12 16

If B1>A1 the font colour s/b one thing, if B1<A1, another colour, and if
A1 is empty (or if A1=B1), leave the cell unchanged.

It is the syntax for detecting whether A1 is empty that foxes me.

TIA.
 
P

papou

Hello Paul
Use either
=ISBLANK(A1)
Or
=A1=""

Thus with your specs:
First condition, formula
=AND(NOT(ISBLANK(A1)),B1>A1)
Second condition formula:
=AND(NOT(ISBLANK(A1)),B1<A1)

HTH
Cordially
Pascal
 
P

Paul Hyett

In microsoft.public.excel on Thu, 11 Oct 2007, papou
Hello Paul
Use either
=ISBLANK(A1)
Or
=A1=""

Thus with your specs:
First condition, formula
=AND(NOT(ISBLANK(A1)),B1>A1)
Second condition formula:
=AND(NOT(ISBLANK(A1)),B1<A1)

Thank you - much appreciated. It worked after a little tweaking.

Also to anyone else who replies.
 

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