Conditonal Format Based On Multiple Strings

drew27c

New Member
Joined
Aug 16, 2016
Messages
24
I want to format cells as different colours based on lists of strings. For example:


Format cell in MyRange as red if value equals String1 or String2 or String3


Format cell in MyRange as blue if value equals String3 or String4 or String5


Format cell in MyRange as green if value equals String6 or String7 or String8

Currently in my drop down list of strings I am appending a prefix and using that as my condition. I'd like to remove the prefix and use just the raw unique strings.
 
Last edited:

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You could use something like
=OR(A1="String1", A1="String2", A1="String3")
Where A1 is the top left cell of the applies to range
 
Upvote 0
Hey that works great. Thanks

Now the follow up question. Each condition has about 200 strings.

Is there a quick and dirty way to make this formula? Concat is proving difficult.
 
Upvote 0
If you have a separate list of the strings for each condition you could use the MATCH function
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,342
Members
448,570
Latest member
rik81h

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