# Conditional Formatting for Multiple Values (Formula Not Working)

#### jewls567

##### New Member
I have a long list of numerical values in a column and I am trying to set up conditional formatting to highlight cells that contain specific values in blue. The values I am trying to apply this formatting to are the following:
• 200180, 200181, 200182, 200252, 200940, 200065
After doing some research online, below is the formula I have been attempting to use via Conditional Formatting (Use a Formula to Determine Which Cells to Format Selection rule type) to complete this task:
=OR(\$A\$1="200180","200181","200182","200252","200940","200065")
Excel accepts the formula I enter but does not highlight the applicable cells that contain those values. Can anyone please help me to fix any errors you see to achieve the highlighting that I am looking for?

### Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

#### Fluff

##### MrExcel MVP, Moderator
What is the range you are trying to apply this to?

#### JoeMo

##### MrExcel MVP
If you want this CF to apply to a range in col A, first select the range, then use this formula:
=OR(\$A1=200180,\$A1=200181,\$A1=200182,\$A1=200252,\$A1=200940,\$A1=200065)

#### jewls567

##### New Member
What is the range you are trying to apply this to?

The range of cells i'm trying to apply the formatting to is the entire A column of cells:

#### Fluff

##### MrExcel MVP, Moderator

In that case if the values are numbers use the formula JoeMo has provided, if they are text enclose the values in quotes.

#### jewls567

##### New Member
The range of cells i'm trying to apply the formatting to is the entire A column of cells:

#### JoeMo

##### MrExcel MVP

See post #3, and select the entire col A. In your initial post you indicated: " I have a long list of numerical values ". If the values are text then enclose each individual number in the post #3 formula in quote marks.

#### jewls567

##### New Member
In that case if the values are numbers use the formula JoeMo has provided, if they are text enclose the values in quotes.

If you want this CF to apply to a range in col A, first select the range, then use this formula:
=OR(\$A1=200180,\$A1=200181,\$A1=200182,\$A1=200252,\$A1=200940,\$A1=200065)

I have been selecting the entire range of column A to ensure the conditional formatting rule applies to all cells with values.

I tried both methods and was not able to get the conditional formatting to work correctly unfortunately.
When I remove the quotes from the formula as these are numbers, only one of the 6 values shows up as highlighted in the column. See below:

When I changed the values in Column A to text the conditional formatting rule does not highlight any of the values at all.

The rule always works if it's just one value I'm trying to highlight in the column. However, when I try using the "OR" function with multiple values, that is where nothing seems to work for me.
Is there anything else I need to try that you might be able to suggest?

#### Fluff

##### MrExcel MVP, Moderator
You said you were trying to apply it to the whole column but your image in post#6 shows you are applying it to A154:A673

#### jewls567

##### New Member
You said you were trying to apply it to the whole column but your image in post#6 shows you are applying it to A154:A673

My apologies, I should have been more clear, the image is correct. I'm applying the rule to all cells that have a value in column A (rows 8 through 673) - many of the rows are hidden due to data that I have filtered out in this report.

Replies
4
Views
110
Replies
6
Views
180
Replies
5
Views
288
Replies
1
Views
107
Replies
7
Views
116