Highlight Duplicates with same date versus within a Timeline

Marsman

Board Regular
Joined
May 13, 2013
Messages
62
Office Version
  1. 365
Platform
  1. Windows
Hello - I am currently using the following formula to show Duplicate values in column C based on the criteria of the date being the same in Column A.

Column B is a manually entered Time stamp that I need to be able to now implement. So, if the info in Column C duplicates within 24 hours of each other I need to change the Highlight Duplicate to that.

I am at a loss on how to change the Date reference to a Date and Time Reference to get the 24 hour window.

any help would great be appreciated.

Book1
ABCDEFGHI
17/15/20215:30 AMtestCurrent Date ResultsDesired Results7/15/20215:30 AMtest
27/15/20215:45 AMtest17/15/20215:45 AMtest1
37/15/20216:05 AMtest27/15/20216:05 AMtest2
47/15/20216:12 AMtest7/15/20216:12 AMtest4
57/16/20216:22 AMtest27/16/20216:22 AMtest2
67/16/20216:47 AMtest37/16/20216:47 AMtest3
77/16/20217:18 AMtest47/16/20217:18 AMtest4
87/16/20217:21 AMtest57/16/20217:21 AMtest5
97/16/20219:54 AMtest67/16/20219:54 AMtest6
107/16/202110:38 AMtest77/16/202110:38 AMtest7
117/16/202111:45 AMtest57/16/202111:45 AMtest5
127/16/202110:58 PMtest97/16/202110:58 PMtest9
137/17/20212:13 AMtest7/17/20212:13 AMtest
147/17/20213:46 AMtest17/17/20213:46 AMtest1
157/17/20214:42 AMtest27/17/20214:42 AMtest2
167/17/20214:44 AMtest37/17/20214:44 AMtest3
177/17/20217:35 AMtest7/17/20217:35 AMtest4
187/17/202111:52 AMtest57/17/202111:52 AMtest5
197/18/20211:11 PMtest67/18/20211:11 PMtest6
207/18/202112:30 AMtest17/18/202112:30 AMtest1
217/18/20211:30 AMtest17/18/20211:30 AMtest
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C1:C21Expression=COUNTIFS($A$1:$A$21,A1,$A$1:$A$21,"<>",$C$1:$C$21,C1,$C$1:$C$21,"<>")>1textNO
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
See if does what you want

15072021 Testes.xlsx
ABC
115/07/202105:30 AMtest
215/07/202105:45 AMtest1
315/07/202106:05 AMtest2
415/07/202106:12 AMtest4
516/07/202106:22 AMtest2
616/07/202106:47 AMtest3
716/07/202107:18 AMtest4
816/07/202107:21 AMtest5
916/07/202109:54 AMtest6
1016/07/202110:38 AMtest7
1116/07/202111:45 AMtest5
1216/07/202110:58 PMtest9
1317/07/202102:13 AMtest
1417/07/202103:46 AMtest1
1517/07/202104:42 AMtest2
1617/07/202104:44 AMtest3
1717/07/202107:35 AMtest4
1817/07/202111:52 AMtest5
1918/07/202101:11 PMtest6
2018/07/202112:30 AMtest1
2118/07/202101:30 AMtest
Plan5
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:C21Expression=--(SOMARPRODUTO(--($C$1:$C$21=$C1);--(ARRED($A$1:$A$21+$B$1:$B$21;6)>=ARRED($A1+$B1-1;6));--(ARRED($A$1:$A$21+$B$1:$B$21;6)<=ARRED($A1+$B1+1;6)))>1)textNO


XL2BB does not convert formulas used in CF in Portuguese to English so, follows English version to be used in CF
=--(SUMPRODUCT(--($C$1:$C$21=$C1),--(ROUND($A$1:$A$21+$B$1:$B$21,6)>=ROUND($A1+$B1-1,6)),--(ROUND($A$1:$A$21+$B$1:$B$21,6)<=ROUND($A1+$B1+1,6)))>1)

Hope this helps

M.
 
Upvote 0
Solution
ok... i have placed into CF and it is not giving me any results? should i be highlighting just column C1:C21 or A1:C21 and inputting the CF that way?
XL2BB does not convert formulas used in CF in Portuguese to English so, follows English version to be used in CF
=--(SUMPRODUCT(--($C$1:$C$21=$C1),--(ROUND($A$1:$A$21+$B$1:$B$21,6)>=ROUND($A1+$B1-1,6)),--(ROUND($A$1:$A$21+$B$1:$B$21,6)<=ROUND($A1+$B1+1,6)))>1)


2021-07-16_11-54-45.jpg


2021-07-16_11-55-23.jpg
 
Upvote 0
Select A1:C21
Home > Conditional Formatting > New rule > Use a formula...
Insert the formula and pick the format you want.

It worked for me

M.
 
Upvote 0
Oddly enough i did your steps, step by step and still nothing.

would it matter that i am using this version of excel maybe? i know there are other limitations to it like VBA but have not come across any formula issues?

Microsoft® Excel® for Microsoft 365 MSO (16.0.14131.20296) 64-bit
 
Upvote 0
I tried the formula one more time and everything worked. There must be problems with your data.

Check that the dates in column A are real dates (numbers), not text that look like dates.

Also check that column B contains times, not dates - when I copied and pasted your data I noticed wrong values in cells B20 and B21 (they contained dates, not times)

M.
 
Upvote 0
thanks again... i got it now.

Once i change the format of the date from dd/mm/yyy to mm/dd/yyyy the highlighting works.

Much appreciate your help with this.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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