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
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,126
Messages
5,857,523
Members
431,883
Latest member
Hien

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
Top