Conditional Formatting with OR

RJB78

Board Regular
Joined
Aug 8, 2016
Messages
69
Office Version
  1. 365
Hello. Looking to do conditional formatting for a cell (A5) to turn color when:

E5="CP","CP-G","CP-GI","CP-D","CP-ETF","CP-G/D","CP-G/GI","CP-G/ETF","CP-D/GI","CP-D/ETF","CP-GI/ETF")

I was using 'use a formula to determine which cells to format" and using an OR function but couldn't get it to work.

Thanks in advance.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Try this:

=OR(E5={"CP","CP-G","CP-GI","CP-D","CP-ETF","CP-G/D","CP-G/GI","CP-G/ETF","CP-D/GI","CP-D/ETF","CP-GI/ETF"})
 
Last edited:
Upvote 0
It says "You may not use reference operators (such as unions, intersections, and ranges) or array constants for Conditional Formatting criteria"
 
Upvote 0
It says "You may not use reference operators (such as unions, intersections, and ranges) or array constants for Conditional Formatting criteria"

Aah that's unfortunate... I guess you will have to change the formula to something of the form =OR(E5="CP",E5="CP-GI",E5=...)
 
Upvote 0
Define CFlist in FORMULAS | Name Manager as referring to:

={"CP","CP-G","CP-GI","CP-D","CP-ETF","CP-G/D","CP-G/GI","CP-G/ETF","CP-D/GI","CP-D/ETF","CP-GI/ETF"}

Now invoke Conditional Formatting the following formula:

=MATCH($E5,CFlist,0)

And choose for the desired formatting.
 
Upvote 0

Forum statistics

Threads
1,216,494
Messages
6,130,977
Members
449,611
Latest member
Bushra

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