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

#### jimgima

##### New Member
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.

Any help would be appreciated.

Thanks.

Jim

### Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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))

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

Choose Formula Is and enter

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

Click Format and Choose color,

Click Ok

Click Ok

Replies
6
Views
98
Replies
4
Views
434
Replies
4
Views
134
Replies
8
Views
293
Replies
4
Views
260

1,217,502
Messages
6,137,015
Members
450,038
Latest member

### 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.

### Which adblocker are you using?

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

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