close

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 quot;blankquot; 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=quot; quot;,A2=quot; quot;), but don't think you
can use quot;IFquot; in conditional formattingThanks

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=quot;quot;,A2=quot;quot;)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

quot;Johnquot; gt; wrote in message
...
gt; I have 2 cells which I select entries from a drop-down (A1 and A2) B2 then
gt; does a simple subtraction of whats selected in A1 and A2
gt;
gt; A user can select only A1 or A2, this would be incomplete thus I want in
gt; this instance to quot;blankquot; out the value returned in B2 i.e. with white
font,
gt; as the result is not very meaning full
gt;
gt; How would I do this under conditional formatting in B2
gt;
gt; I thought of something like this if(or(A1=quot; quot;,A2=quot; quot;), but don't think you
gt; can use quot;IFquot; in conditional formatting
gt;
gt;
gt; Thanks
gt;
gt;
gt;
Try: =OR(ISBLANK(A1),ISBLANK(A2))

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

quot;Johnquot; gt; wrote in message
...
gt;I have 2 cells which I select entries from a drop-down (A1 and A2) B2 then
gt;does a simple subtraction of whats selected in A1 and A2
gt;
gt; A user can select only A1 or A2, this would be incomplete thus I want in
gt; this instance to quot;blankquot; out the value returned in B2 i.e. with white
gt; font, as the result is not very meaning full
gt;
gt; How would I do this under conditional formatting in B2
gt;
gt; I thought of something like this if(or(A1=quot; quot;,A2=quot; quot;), but don't think you
gt; can use quot;IFquot; in conditional formatting
gt;
gt;
gt; Thanks
gt;
gt;
gt;
Hi!

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

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

=OR(A1=quot;quot;,A2=quot;quot;)

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

=IF(OR(A1=quot;quot;,A2=quot;quot;),quot;quot;,A2-A1)

Biff

quot;Johnquot; gt; wrote in message
...
gt;I have 2 cells which I select entries from a drop-down (A1 and A2) B2 then
gt;does a simple subtraction of whats selected in A1 and A2
gt;
gt; A user can select only A1 or A2, this would be incomplete thus I want in
gt; this instance to quot;blankquot; out the value returned in B2 i.e. with white
gt; font, as the result is not very meaning full
gt;
gt; How would I do this under conditional formatting in B2
gt;
gt; I thought of something like this if(or(A1=quot; quot;,A2=quot; quot;), but don't think you
gt; can use quot;IFquot; in conditional formatting
gt;
gt;
gt; Thanks
gt;
gt;
gt;
Two ways to do this. Either modify the formula in B2 to:

=IF(OR(A1=quot;quot;,A2=quot;quot;),quot;quot;,A1-A2)

Or use Conditional Formatting with the condition:

=OR(A1=quot;quot;,A2=quot;quot;) 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 =quot;OR(A1=quot;quot;quot;quot;,A2=quot;quot;quot;quot;)quot;, you need to edit the
formula

I would suggest the formula is the simpler approach

Regards

Trevorquot;Johnquot; gt; wrote in message
...
gt;I have 2 cells which I select entries from a drop-down (A1 and A2) B2 then
gt;does a simple subtraction of whats selected in A1 and A2
gt;
gt; A user can select only A1 or A2, this would be incomplete thus I want in
gt; this instance to quot;blankquot; out the value returned in B2 i.e. with white
gt; font, as the result is not very meaning full
gt;
gt; How would I do this under conditional formatting in B2
gt;
gt; I thought of something like this if(or(A1=quot; quot;,A2=quot; quot;), but don't think you
gt; can use quot;IFquot; in conditional formatting
gt;
gt;
gt; Thanks
gt;
gt;
gt;
Thanks everyone

quot;Trevor Shuttleworthquot; gt; wrote in message
...
gt; Two ways to do this. Either modify the formula in B2 to:
gt;
gt; =IF(OR(A1=quot;quot;,A2=quot;quot;),quot;quot;,A1-A2)
gt;
gt; Or use Conditional Formatting with the condition:
gt;
gt; =OR(A1=quot;quot;,A2=quot;quot;) and just a simple A1-A2 formula
gt;
gt; Just be careful with the quotes, as Excel sometimes doubles them up for
gt; me. So, if you get something like =quot;OR(A1=quot;quot;quot;quot;,A2=quot;quot;quot;quot;)quot;, you need to edit
gt; the formula
gt;
gt; I would suggest the formula is the simpler approach
gt;
gt; Regards
gt;
gt; Trevor
gt;
gt;
gt; quot;Johnquot; gt; wrote in message
gt; ...
gt;gt;I have 2 cells which I select entries from a drop-down (A1 and A2) B2 then
gt;gt;does a simple subtraction of whats selected in A1 and A2
gt;gt;
gt;gt; A user can select only A1 or A2, this would be incomplete thus I want in
gt;gt; this instance to quot;blankquot; out the value returned in B2 i.e. with white
gt;gt; font, as the result is not very meaning full
gt;gt;
gt;gt; How would I do this under conditional formatting in B2
gt;gt;
gt;gt; I thought of something like this if(or(A1=quot; quot;,A2=quot; quot;), but don't think
gt;gt; you can use quot;IFquot; in conditional formatting
gt;gt;
gt;gt;
gt;gt; Thanks
gt;gt;
gt;gt;
gt;gt;
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()