View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Conditional Format and OR

Because both parts get evaluated in an OR, even when the first succeeds. So
when there is an error, the pctRange<=1/8 still evaluates, and this returns
the same error, thus the CF fails.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Dallman Ross" <dman@localhost. wrote in message
...
In , Bob Phillips
spake thusly:

Hate to suggest a CF with IF, but try this

=IF(ISERROR(pctRange),TRUE,IF(pctRange<=1/8,TRUE))


Gack! It works, though. This also works:

=IF(ISERROR(pctRange),TRUE,pctRange<=1/8)

Too bad the OR thing didn't work -- it seems like it ought to.
Does anybody have any thought on why it doesn't?

Thanks, Bob. Much obliged.

================================================== =====
"Dallman Ross" <dman@localhost. wrote in message
...
In Excel 2002, I'm trying to color a cell based on this formula:

=pctRange<=1/8

That works fine in most cases. "pctRange" is a named expression and
evaluates correctly to a calculated number. However, sometimes
the the expression's denominator can be zero. In that case,
I'd still like the condition to work.

So I tried this:

=OR(ISERROR(pctRange),pctRange<=1/8)

But the condition still doesn't evaluate as true, even though
the ISERROR(pctRange) expression does evaluate as true.

How can I do what I want? That is, if pctRange <= 1/8 or
pctRange gives a #DIV/0! error, apply the conditional formatting.

Thanks,
Dallman