Highlight duplicate cells within a column

crwilson

New Member
Joined
Jun 24, 2012
Messages
5
I understand how highlighting cells and/or formatting text goes but i'm struggling to highlight only cells which have duplicates within a column.

ie. I have usernames in column B starting at cell B2 and want to highlight any cells which have the same username. In the example below i'd be looking to highlight the duplicate cells for 'dave1234' and 'chris35'

dave1234
eric89
samantha21
dave1234
dave1234
chris35
johnny1999
barry_lynn
dave1234
angela_b
chris35
chris35
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
The conditional formatting dialogue box allows you to format cells which are duplicating.
Highlight the range and enter the keystrokes ALT O D and then choose format only unique or duplicate values.
Then choose duplicate values and the formatting desired.

If you wanted to only highlight the duplicate cells then you would need to use the following formulae within the conditional formatting dialogue box

=COUNTIF($A$1:A1, A1)>1

Assuming your data begins in cell A1.
Select the range and be sure to have the cell A1 as the active cell when entering the formula in the conditional formatting dialogue box.
 
Upvote 0
Many thanks for your reply.

Do you have any idea how to do this in VB as i want to add it to an existing Macro. I do this task multiple times per day, every day and want to try and automate it.
 
Upvote 0
Unfortunately I am VBA novice... Perhaps there is a guru out there who can easily do it!
 
Upvote 0

Forum statistics

Threads
1,207,105
Messages
6,076,580
Members
446,215
Latest member
userds5593

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