Highlight duplicate values when two other pairs of cells have matching values

Rorando

New Member
Joined
Jan 9, 2020
Messages
4
Office Version
  1. 2013
Platform
  1. Windows
Greetings!

I'm trying to get find a way to highlight cells so I can see if duplicate values exist during the same day and time. This so I can easily spot these duplicates and change my dates/times in L column to avoid these.

In other words: How to highlight duplicate values in cell range: A1:K12, when L1 & L2 are both matching with any other combination of two cells in L Column, i.e. L4 & L5 / L7 & L8 / L10 & L11

An example here:

MrexcelQ.jpg


D1 & A10 Have duplicate values (33) in the picture. But I only want them highlighted because Their respective L Column values "Mon 13 Jan" & "13.00" match with L10 & L11

A7 & G10 Have duplicate values (39) in the picture, but since both their respective L column values don't match, I Don't want them highlighted.


I hope I am making myself clear enough to get some help in this matter.

All the best // R
 
I'm trying to get find a way to highlight cells so I can see if duplicate values exist during the same day and time.
If you are interested, you could do this with Conditional Formatting so there would be no need to re-run any code if any values in the range are added/changed and the shading would update automatically when/if values are changed.

I have added a helper column with O4 formula copied down as far as you might ever need. That column could then be hidden if you want.
Then select A4:K? (I have applied it to A4:K18 in case another section is added) and apply the Conditional Formatting shown.

It is easily expandable to any number of columns (& merged cells in columns L:N are not a problem)

Book1
ABCDEFGHIJKLMNO
3
46132633434712720221622213/01/202013/01/2020 1:00:00 PM
50000000000013:0013/01/2020 1:00:00 PM
60000000000013/01/2020 1:00:00 PM
725891617201000014/01/202014/01/2020 1:00:00 PM
80000000000013:0014/01/2020 1:00:00 PM
90000000000014/01/2020 1:00:00 PM
10394046484950545669727414/01/202014/01/2020 1:00:00 PM
11116133135139000000013:0014/01/2020 1:00:00 PM
120000000000014/01/2020 1:00:00 PM
13333435363738394041424313/01/202013/01/2020 1:00:00 PM
14295309310337000000013:0013/01/2020 1:00:00 PM
150000000000013/01/2020 1:00:00 PM
1613/01/2020 1:00:00 PM
1713/01/2020 1:00:00 PM
1813/01/2020 1:00:00 PM
Sheet1
Cell Formulas
RangeFormula
O4:O18O4=IF(COUNT(L4:N5)=2,L4+L5,O3)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A4:K18Expression=AND(SUMPRODUCT(($A$4:$K$18=A4)*($O$4:$O$18=$O4))>1,A4<>0)textNO
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,223,954
Messages
6,175,601
Members
452,658
Latest member
GStorm

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