Highlight duplicates for case-sensitive matches

excelguy2024

New Member
Joined
Jun 17, 2024
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hello,

Is there a way to make conditional formatting case sensitive?

I want to highlight the duplicate values in Column A and Column B. When I currently do this, all duplicates are highlighted regardless of their case. I want the exact matches only to be highlighted.

Thanks!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
If you are using SEARCH(), you can replace it with FIND() as FIND() is case sensitive and SEARCH() is not. If you are not using these, could you show what CF formula you are using?
 
Upvote 0
Hi there,

I'm not looking to replace the values, only highlight the duplicates for exact matches only (case sensitive).

I am currently selecting all data in Column A & Column B and then selecting Home -> Conditional Formatting -> Highlight Cell Rules -> Duplicate Values. The issue is that it highlights the duplicates regardless of their case (case insensitive).

Thanks
 
Upvote 0
Try this for your CF rule, choose New Rule and Use a formula to determine which cells to format:

Excel Formula:
=SUM(--ISNUMBER(FIND(A1,$A$1:$A1)))>1

Of course, change the ranges to suit your data.

Book1
A
1Red
2Orange
3Yellow
4green
5green
6Purple
7Red
8Orange
9Yellow
10green
11green
12Purple
13Red
14Orange
15Yellow
16green
17Blue
18Purple
19Red
20Orange
21Yellow
22green
23green
24Purple
Sheet3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:A24Expression=SUM(--ISNUMBER(FIND(A1,$A$1:$A1)))>1textNO
 
Upvote 0
Thanks for the response but it doesn't seem to working here. I've attached an example to clarify my request.

When I highlight Column A & B (below) in Excel -> Select Conditional Formatting -> Highlight Cell Rules -> Duplicate Values, many matches are found because the case is insensitive.

I only want the words in bold to be in red because they are exact matches:

Column A:

site
affair
hell
abandon
feign
say
make
assertive
revolutionary
potential
overlook

Column B:

dare
plan
finish
improve
society
Venus
reverse
answer
established
X-ray
mutter
instinct
page
mole
primary
ask
option
soldier
ghostwriter
declaration
SITE
AFFAIR
HELL
ABANDON
FEIGN
SAY
MAKE
ASSERTIVE
REVOLUTIONARY
POTENTIAL
OVERLOOK
sItE
AfFaIr
hElL
AbAnDoN
FeIgN
SaY
MaKe
aSsErTiVe
rEvOlUtIoNaRy
pOtEnTiAl
oVeRlOoK
say
assertive
potential
 
Upvote 0
You are NOT going to be able to do this with the built-in Conditional Formatting options available to you like that. As you can see, they are case-insensitive.
You are going to have to use the "Use a formula to determine which cells to format" option and write a formula, like shown in the link.
 
Upvote 0
You are NOT going to be able to do this with the built-in Conditional Formatting options available to you like that. As you can see, they are case-insensitive.
You are going to have to use the "Use a formula to determine which cells to format" option and write a formula, like shown in the link.
Agreed and this is the part I'm struggling with.
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Highlight duplicates for case-sensitive matches
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Yeah, it does not appear to be an easy task. It would be easier if you were just comparing a list to a single value. But comparing two lists makes it a bit more tricky.
I do not use REGEX much myself, so I don't really know how to incorporate the formula from that link into your situation.
I found this other post, and the formula from "The NOmadic" seemed promising too, but I could not get it to work either:
If it were me, I might try to use VBA instead and loop through all the values and check each one.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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