Why does this not work

cdsaroma

Board Regular
Joined
Feb 5, 2003
Messages
200
When I enter this in 'Conditional Formatting' (cell M2) it doesn't work but if I enter it directly into the cell (M2) as a function it works (I get "No Pw")?

=IF(A2=2000,"No PW","")

I wanted to be able to change the cell color as well, that's why I was trying to use the Cond. Format.

thanks
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Conditional formatting needs a True or False statement..
That formula returns a text string of either "" or "No PW"

Try removing the IF, and just leave it as

=A2=2000

This returns either TRUE or FALSE, based on if A2=2000
When it's TRUE, the conditional formatting will be applied.
If it's FALSE, no formatting will be applied.

Hope that helps.
 
Upvote 0
Conditional formatting needs a True or False statement..
That formula returns a text string of either "" or "No PW"

Try removing the IF, and just leave it as

=A2=2000

This returns either TRUE or FALSE, based on if A2=2000
When it's TRUE, the conditional formatting will be applied.
If it's FALSE, no formatting will be applied.

Hope that helps.

So I can't return a text string from a Conditional Format?

thanks
 
Upvote 0
Conditional formatting doesn't "return" Anything...
It applies a specified format to cell(s) based on a Condition (true or false)
 
Upvote 0
Conditional formatting doesn't "return" Anything...
It applies a specified format to cell(s) based on a Condition (true or false)

Ok, thanks for your help.

What if I entered a (string of) functions into the cell and used the CF to give me the formatting depending on what is returned?

Could you help me put this into a string?
these are the (3) formulas:
=IF(A2<1994,"No PW","") =IF(A2>=1994,"Card","") =M2="lux"

thanks
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,706
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top