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

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
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,214,957
Messages
6,122,472
Members
449,087
Latest member
RExcelSearch

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