Conditional Formatting with multiple text values

titchestiny

New Member
Joined
Nov 3, 2013
Messages
20
Hi,

I'm trying to use conditional formatting to colour cells within a column based on the text they contain. For example if A1 = A or B or C or D colour red, if A1 = E or F or G or H colour blue, if A1 = I or J or K or L colour green.

I've tried some formulas, and while they are being excepted, the cells are not changing colour. I can create formatting rules based on a single aspect i.e. if A1 = A colour red, if A1 = B colour red, but I would have to create a lot of rules, which I want to try and avoid. Any help would be greatly appreciated.

Thanks,

Tt

p.s. I'm using Excel 2010
 
Ok I am a goofball, I tried it with "Use a formula to determine witch cells to format
with =OR(A1="A", A1="B", A1="C", A1="D") and it worked! Thanks, I will modify it to suit my needs!!!
Thanks, without this thread I would not have got it.
Simple mistake
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
@DuchDiggy
you are the man! after many searches and tries, i have finally got something that works!
the goal was to format only cells that contain specific texts as opposed to what MS excel offers in the 2007 version: format only cells that contain specific text.
so, for example, if you have a column d having the color names, you use the formula below to find all d column cells having red, orange or purple:
Code:
=or(d1="red",d1="orange",d1="purple")
just make sure that you "edit rule" to change "applied to" to =$d$1:$d$100000 (say, if you have 1,00,000 active rows), and check "stop if true".
 
Upvote 0
@DutchDiggy
oh well, this works if the cell has those names ONLY. if, for example, one cell has redpanda or orangeshoe instead of red/orange it doesn't get it.:confused:
 
Upvote 0
[FONT=&quot]Looks like I have figured out![/FONT][FONT=&quot][/FONT][FONT=&quot]If the goal is to format only cells that "contain" (not equal to) specific texts, [/FONT][FONT=&quot]for example, if you have a column D having the color names, you use the formula below to find all D column cells having red, orange or purple:[/FONT]
Code:
[COLOR=#2A2E2E][FONT=&quot]=OR(ISNUMBER(SEARCH("red",D1)),ISNUMBER(SEARCH("orange",D1)),ISNUMBER(SEARCH("purple",D1)))[/FONT][/COLOR]
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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