Coloring cells based on text in another cell.

andrewb90

Well-known Member
Joined
Dec 16, 2009
Messages
1,077
So I have cell 'A3' that may have a variety of words or phrases typed into it. if the term 'unused' appears I want cells B3:D3 to have a background color filled in. I think this is probably really simple and I am just missing it.
Thanks,
Andrew
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
1) Highlight columns B:D
2) Select Format > Conditional Formatting
3) Use these settings:

Condition1:

Formula Is:
=ISNUMBER(SEARCH("unused", $A1))

Format...Pattern:
Select a color
 
Upvote 0
to piggy back on this subject how could i change the formula to format A1 to change colors based on if B1 is Blank?
 
Upvote 0
1) Highlight column A
2) Select Format > Conditional Formatting
3) Use these settings:

Condition1:

Formula Is:
=ISBLANK($B1)

Format...Pattern:
Select a color
 
Upvote 0
Andrew

A couple of points about your first question.

1. You don't need the ISNUMBER when used in Conditional Formatting. This should do the same thing
=SEARCH("unused",$A3)

2. It may not occur with "unused" but suppose you are interested in the word "his" and A3 contained "This is clever". The suggested CF formula structure would highlight the cells. If you only want to highlight when the word itself is found, try this sort of formula in your CF

=SEARCH(" his "," "&$A3&" ")
 
Upvote 0

Forum statistics

Threads
1,214,822
Messages
6,121,770
Members
449,049
Latest member
greyangel23

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