Conditional formatting to highlight duplicate and ignore value x in same column

Jsejms

New Member
Joined
Jun 23, 2021
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hello,
I'm trying to figure out how I can highlight cells that contain duplicate values, but only if they are in the same column.

Obviously, I could just go column by column and add a conditional formatting rule for each, but I'd like to be able to use one rule that applies to my entire range of data, and I am not sure how to ignore the exceptions.

Data is in D5:AS53. Here's the rules that need to be considered with the formula/rule:

Highlight duplicate values that:
- Are in the same column

Ignore values that are:
- "RDO", "1", "X"


Anyone know how I can accomplish this? Thank you in advance!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi Jsejms,

Does this do what you want?

Jsejms.xlsx
DEFGAQARAS
5DogGoatCat
6GoatSheep
7SheepRDOSheepGoatSheep77
32SheepGoatSheep1
33RDOSheepGoat1
34Goat2
35X1Goat2
51XXSheepGoat
52SheepGoat77
53PigGoatGoat
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D5:AS53Expression=AND(D5<>"X",D5<>"RDO",D5<>1,COUNTIF(D$5:D$53,D5)>1)textNO
 
Upvote 0
Solution
Hi Jsejms,

Does this do what you want?

Jsejms.xlsx
DEFGAQARAS
5DogGoatCat
6GoatSheep
7SheepRDOSheepGoatSheep77
32SheepGoatSheep1
33RDOSheepGoat1
34Goat2
35X1Goat2
51XXSheepGoat
52SheepGoat77
53PigGoatGoat
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D5:AS53Expression=AND(D5<>"X",D5<>"RDO",D5<>1,COUNTIF(D$5:D$53,D5)>1)textNO
That's amazing!! Thanks brother
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,593
Members
452,654
Latest member
mememe101

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