Applying conditional formatting to cells containing various text

JMatBoS

New Member
Joined
Nov 26, 2015
Messages
3
I'd appreciate help with the following...

I have several thousand cells across multiple columns and rows that contain long text strings.

I want to format cells which contain one of a group of values
eg. cells containing aaa or bbb or ccc would be one colour, ddd or eee or fff another colour, etc.

I know I can use conditional formatting where cells contain specific text but this is likely to be a labourious process. There could be over a hundred text values and only a handful of different formats.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
You could add your instances of aaa, bbb and ccc to one column on a hidden sheet.
The next group of strings in the column next to it.

And then have as many conditional formats as you have groups with following condition:
(group of strings to be caught by the condition are in column K, the condition is entered for whatever range you want, but your top left cell selected is B2. Adjust as needed)
Condition formula:
VLOOKUP(B2,K:K,1,0)=B2

And set format specifications, of course.
 
Upvote 0

Forum statistics

Threads
1,215,161
Messages
6,123,380
Members
449,097
Latest member
Jabe

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