VBA to highlight duplicates in combinations of 2 ranges

Netvice

New Member
Joined
Jan 19, 2023
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
I would appreciate your help in the following issue: 3 columns with dates, 6 columns with names. Any name can be in any column J-O, any date can be in any column G-i. Even on different rows.

One name cannot be assigned a date >= 2 times (the guy can't be auditing in 2 places at the same time).
When this happens, I need highlighted the duplicate date and name.

I have included 2 images ("Registru", where I need to input the VBA code and "Registru2", where I exemplified finding the duplicates using 18 additional columns concatenating date + name).

Thank you very much,

Registru.xlsm
GHIJKLMNO
1ziua 1ziua 2ziua 3Auditor sefAuditor 1Auditor 2Auditor 3Expert tehnic 1Expert tehnic 2
215-Jan-202316-Jan-202317-Jan-2023Name1Name3Name5Name8Name10Name15
314-Jan-202315-Jan-202316-Jan-2023Name2Name1Name7Name7Name11Name16
412-Jan-202313-Jan-202314-Jan-2023Name2Name4Name1Name12Name17
510-Jan-202311-Jan-202315-Jan-2023Name3Name6Name8Name13
609-Jan-202309-Jan-202310-Jan-2023Name4Name7Name14
Iesiri
Cells with Data Validation
CellAllowCriteria
J2:O6List=Liste!$A$2:$A$16
 

Attachments

  • Img2.jpg
    Img2.jpg
    125.1 KB · Views: 20
  • Img3.jpg
    Img3.jpg
    86.1 KB · Views: 21
Last edited by a moderator:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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