Conditional formatting--simple question

  • Thread starter Thread starter John Wirt
  • Start date Start date
J

John Wirt

Why does this conditional formating statement not work?

="IF(C13<D13,1,0)"

WHen I apply this conditional format to a cell in G13, it has no effect on
the format of the number in G13. The format is to cross-hatch the cell
pattern if the condition is true.

I have tried, "IF(C13<D13,1,0)," which makes no difference.

Thank you.

John Wirt
 
I think you are misunderstanding Conditional Formatting. This of it as <if
this formula is true> then <use this format>. Your formula gives a numeric
value not a Boolean one.
So, with G13 selected, open the Conditional Formatting dialog and enter
=C13<D13 as your formula, then set formatting.
best wishes
 
Hi!

You don't need the quotes around the formula. Sometimes under certain
conditions the cf user form does that. You can just edit those out.

Or, use this formula:

=C13<D13

Biff
 
Why does this conditional formating statement not work?

="IF(C13<D13,1,0)"

WHen I apply this conditional format to a cell in G13, it has no effect on
the format of the number in G13. The format is to cross-hatch the cell
pattern if the condition is true.

I have tried, "IF(C13<D13,1,0)," which makes no difference.

Thank you.

John Wirt

The enclosed double quotes causes Excel to treat your "formula" as a string of
text. So it will only match if G13 contains that text AND if you are using the
Cell Value Is option.

What you probably want is the Formula Is: option.

In addition, since all you need is something that will return TRUE or FALSE, it
would be simpler to use the formula:

=C13<D13

instead of the IF(...) formual.


--ron
 
You can use formulas that evaluate to a numeric value.

If the formula evaluates to zero, that's "considered" FALSE. If the formula
evaluates to any other number (including negatives), it's "considered" TRUE.

Biff
 

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

Back
Top