Conditional formatting based on what another cell contains

LadyHarper

Board Regular
Joined
Jun 28, 2017
Messages
50
Office Version
  1. 365
Platform
  1. Windows
I feel so stupid asking this... but for the life of me the answer is not coming

If Cell A4 Contains "Uplift" turn cell B4 Orange
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
You write the Conditional Formatting rule for cell B4, and use the "Use a formula to determine which cells to format" option and use the formula:
Excel Formula:
=ISNUMBER(SEARCH("Uplift",A4))

Note that the Search function is NOT case-sensitive. So it will find "UPLIFT", "Uplift", "uplift", etc.
If you only want to find it is EXACTLY "Uplift", use the FIND function instead of the SEARCH function, i.e.
Excel Formula:
=ISNUMBER(FIND("Uplift",A4))
 
Upvote 0
Solution
You write the Conditional Formatting rule for cell B4, and use the "Use a formula to determine which cells to format" option and use the formula:
Excel Formula:
=ISNUMBER(SEARCH("Uplift",A4))
I swear I tried this and it didn't work. Thank you
 
Upvote 0
You are welcome. Glad I was able to help.

Note the update I made to my previous reply, mentioning the difference between SEARCH and FIND.
 
Upvote 0
You are welcome. Glad I was able to help.

Note the update I made to my previous reply, mentioning the difference between SEARCH and FIND.
Thank you for explaining the difference, as I did not know. When you make a conditional formatting rule, does it write something in VBA?

Also, what exactly does the ISNUMBER function do? I have not used that previously. Thanks.
 
Upvote 0
Thank you for explaining the difference, as I did not know. When you make a conditional formatting rule, does it write something in VBA?
No, Conditional Formatting does not write to VBA. It has nothing to do with VBA, it is a built-in Excel feature, like sorting, formatting, etc.
Note that you can write VBA code that creates Conditional Formatting rules.

Also, what exactly does the ISNUMBER function do? I have not used that previously. Thanks.
As you might have guessed, it checks to see whether a cell contains a valid number (like all the "IS" functions, it returns a boolean value of TRUE or FALSE).
Note that it not only checks to see if the number is numeric, but also that is was added as number.
If you enter a number as text, it will return FALSE (i.e. if you type a single quote mark before your entry, it will enter it as text).

1715371158372.png


Note that most valid-entered numbers are right-justified, while most text entries are left-justified (unless you manually change the justification).

Also note that Microsoft/Excel has pretty good documentation on all their functions.
You can find it with a simple Google Search (i.e. "Excel ISNUMBER function").
 
Upvote 0

Forum statistics

Threads
1,216,118
Messages
6,128,939
Members
449,480
Latest member
yesitisasport

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