Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John
 
Posts: n/a
Default Conditional Formatting Q

I have 2 cells which I select entries from a drop-down (A1 and A2) B2 then
does a simple subtraction of whats selected in A1 and A2

A user can select only A1 or A2, this would be incomplete thus I want in
this instance to "blank" out the value returned in B2 i.e. with white font,
as the result is not very meaning full

How would I do this under conditional formatting in B2

I thought of something like this if(or(A1=" ",A2=" "), but don't think you
can use "IF" in conditional formatting


Thanks



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Conditional Formatting Q

You don't need IF in CF, as you are only interested in a TRUE/FALSE value.
You can use it, but it is unnecessary.

Change the Condition to Formula Is and use

=OR(A1="",A2="")

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"John" wrote in message
...
I have 2 cells which I select entries from a drop-down (A1 and A2) B2 then
does a simple subtraction of whats selected in A1 and A2

A user can select only A1 or A2, this would be incomplete thus I want in
this instance to "blank" out the value returned in B2 i.e. with white

font,
as the result is not very meaning full

How would I do this under conditional formatting in B2

I thought of something like this if(or(A1=" ",A2=" "), but don't think you
can use "IF" in conditional formatting


Thanks





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default Conditional Formatting Q

Try: =OR(ISBLANK(A1),ISBLANK(A2))

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"John" wrote in message
...
I have 2 cells which I select entries from a drop-down (A1 and A2) B2 then
does a simple subtraction of whats selected in A1 and A2

A user can select only A1 or A2, this would be incomplete thus I want in
this instance to "blank" out the value returned in B2 i.e. with white
font, as the result is not very meaning full

How would I do this under conditional formatting in B2

I thought of something like this if(or(A1=" ",A2=" "), but don't think you
can use "IF" in conditional formatting


Thanks





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Conditional Formatting Q

Hi!

I thought of something like this if(or(A1=" ",A2=" "), but don't think you
can use "IF" in conditional formatting


You can, but in this case it's not needed. Try this:

=OR(A1="",A2="")

However, instead of using conditional formatting why not just write the
subtraction formula in B2 to test for blanks?

=IF(OR(A1="",A2=""),"",A2-A1)

Biff

"John" wrote in message
...
I have 2 cells which I select entries from a drop-down (A1 and A2) B2 then
does a simple subtraction of whats selected in A1 and A2

A user can select only A1 or A2, this would be incomplete thus I want in
this instance to "blank" out the value returned in B2 i.e. with white
font, as the result is not very meaning full

How would I do this under conditional formatting in B2

I thought of something like this if(or(A1=" ",A2=" "), but don't think you
can use "IF" in conditional formatting


Thanks





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Trevor Shuttleworth
 
Posts: n/a
Default Conditional Formatting Q

Two ways to do this. Either modify the formula in B2 to:

=IF(OR(A1="",A2=""),"",A1-A2)

Or use Conditional Formatting with the condition:

=OR(A1="",A2="") and just a simple A1-A2 formula

Just be careful with the quotes, as Excel sometimes doubles them up for me.
So, if you get something like ="OR(A1="""",A2="""")", you need to edit the
formula

I would suggest the formula is the simpler approach

Regards

Trevor


"John" wrote in message
...
I have 2 cells which I select entries from a drop-down (A1 and A2) B2 then
does a simple subtraction of whats selected in A1 and A2

A user can select only A1 or A2, this would be incomplete thus I want in
this instance to "blank" out the value returned in B2 i.e. with white
font, as the result is not very meaning full

How would I do this under conditional formatting in B2

I thought of something like this if(or(A1=" ",A2=" "), but don't think you
can use "IF" in conditional formatting


Thanks







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John
 
Posts: n/a
Default Conditional Formatting Q

Thanks everyone

"Trevor Shuttleworth" wrote in message
...
Two ways to do this. Either modify the formula in B2 to:

=IF(OR(A1="",A2=""),"",A1-A2)

Or use Conditional Formatting with the condition:

=OR(A1="",A2="") and just a simple A1-A2 formula

Just be careful with the quotes, as Excel sometimes doubles them up for
me. So, if you get something like ="OR(A1="""",A2="""")", you need to edit
the formula

I would suggest the formula is the simpler approach

Regards

Trevor


"John" wrote in message
...
I have 2 cells which I select entries from a drop-down (A1 and A2) B2 then
does a simple subtraction of whats selected in A1 and A2

A user can select only A1 or A2, this would be incomplete thus I want in
this instance to "blank" out the value returned in B2 i.e. with white
font, as the result is not very meaning full

How would I do this under conditional formatting in B2

I thought of something like this if(or(A1=" ",A2=" "), but don't think
you can use "IF" in conditional formatting


Thanks







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
Keeping conditional formatting when sorting Andrea A Excel Discussion (Misc queries) 0 April 4th 06 03:00 PM
Conditional Formatting when inserting a row zahoulik Excel Worksheet Functions 2 January 7th 06 03:01 PM
Conditional Formatting Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM
difficulty with conditional formatting Deb Excel Discussion (Misc queries) 0 March 23rd 05 06:13 PM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 12:41 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"