color format cell if it matches any data in another column?

jimgima

New Member
Joined
Sep 19, 2006
Messages
26
First off, thank you for taking the time to read my post. I searched for an answer and couldn't find one.

I would like to use conditional formatting on the problem listed below:

I want the data in certain cells of Column B to turn green if they match the value of ANY cell in column C. Also I want it to turn red if matches ANY of values in column D.

Below is an example of how I want it to look.

Column B
211
245
32
456
332
324
334
342

Column C would contain the numbers 32, 324 and 342
Column D would contain the number 456

I know there is an easier way to do this, but due to the constrictions put on us by this pre-existing spreadsheet; I have no other options. Personally I think it's a stupid spreadsheet, but this is what they want. Please help me look like I know what's going on. :LOL:

Any help would be appreciated.

Thanks.

Jim
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
If B1 is the active cell when you choose Conditional Formatting, Condition 1 Formula is:

=ISNUMBER(MATCH(B1,C:C,FALSE))

and Condition2 Formula is:

=ISNUMBER(MATCH(B1,D:D,FALSE))
 

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Select entire column B:

Go to Format|Conditional Formatting

Choose Formula Is and enter

=ISNUMBER(MATCH(B1,D:D,0))

Click Format and Choose color,

Click Ok
Click Add

Choose Formula Is and enter

=ISNUMBER(MATCH(B1,C:C,0))

Click Format and Choose color,

Click Ok

Click Ok
 

Watch MrExcel Video

Forum statistics

Threads
1,114,381
Messages
5,547,608
Members
410,802
Latest member
DataMgmtAnalyst7
Top