Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 390
Default Conditional Format and OR

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Conditional Format and OR

try
=if(ISERROR(pctRange),true,pctRange<=1/8)

"Dallman Ross" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Conditional Format and OR

Hate to suggest a CF with IF, but try this

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

--
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 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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 390
Default Conditional Format and OR

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

  #5   Report Post  
Posted to microsoft.public.excel.misc
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Format (not color format) jatman Excel Discussion (Misc queries) 1 November 22nd 06 08:41 AM
How to create a conditional format that changes the number format tmbo Excel Discussion (Misc queries) 1 August 23rd 06 06:20 AM
Conditional Format - Format Transfer To Chart ju1eshart Excel Discussion (Misc queries) 0 June 1st 06 02:46 PM
copy conditional format to regular format GDC Setting up and Configuration of Excel 3 May 4th 05 09:35 PM
copy conditional format as ACTUAL format Dana Zulager Excel Discussion (Misc queries) 7 December 7th 04 11:02 PM


All times are GMT +1. The time now is 05:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"