VBA to highlight duplicates in columns

Yamasaki450

Board Regular
Joined
Oct 22, 2021
Messages
71
Office Version
  1. 2021
Platform
  1. Windows
Hi guys. I did some Google search but cant find VBA i need so here i am again...

I need VBA to highlight duplicates in each column separately. I have quite large amount of data to process from B2 to VQN19.

I did first couple of columns manually with conditional formatting to show example... (see screenshot).

Than you...
 

Attachments

  • Clipboard02.png
    Clipboard02.png
    78.7 KB · Views: 9

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.
Use this formula:

Excel Formula:
=COUNTIF(B$2:B$19,B2)>1

Applies to:
=$B$2:$VQN$19

Example:
varios 02oct2024.xlsm
BCDEF
21722101
32033102
4371103
5172104
613105
724106
835107
941105
10539109
11640110
12741111
13842112
14943113
15544114
16645115
17746116
182247117
193348118
Hoja4
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:VQN19Expression=COUNTIF(B$2:B$19,B2)>1textNO
 
Upvote 1
Solution

Forum statistics

Threads
1,223,885
Messages
6,175,184
Members
452,615
Latest member
bogeys2birdies

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