Find duplicates as per Date and AM/PM

atif_ar

New Member
Joined
May 31, 2014
Messages
31
Dears,

Please help me on this. I want to find duplicates in Column A with Date in B and automatically enter date in Column F with Duplicate no in Column G and Time AM/PM in Column H. And then automatically move to next cell with same date if AM/PM and if not then new Date AM/PM with duplicate nos. I hope you understand
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi atif,

It is almost always best to include a sample of your data both your starting point and some expected results so that the viewers know exactly what you are wanting.

With that said, can you please post an example of your data in columns A and B, and then show what you are expecting your results to be in columns G and H?
 
Upvote 0
Thanks a lot for your reply. Dear please find data below



Column A Column B Column C

INPUT DATA
Item Date Time/AM-PM
Apple4/5/2019 AM
Banana4/5/2019 AM
Carrot4/5/2019 AM
WaterMelon4/5/2019 AM
Pineapple4/5/2019 AM
Apricot4/5/2019 AM
Apple4/5/2019 AM
Apple4/6/2019 AM
Banana4/6/2019 AM
Carrot4/6/2019 AM
WaterMelon4/6/2019 AM
Pineapple4/6/2019 AM
Banana4/6/2019 AM
Apple4/6/2019 AM
Carrot4/6/2019 AM
WaterMelon4/5/2019 PM
Apricot4/5/2019 PM
Banana4/5/2019 PM
WaterMelon4/5/2019 PM

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>


Column G Column H Column I

RESULT DATA AUTOMATICALLY ADD WITH NEXT CELL
DateDup Items CountTime
4/5/2019 2AM
4/5/2019 1PM
4/6/2019 3AM

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
Could try the below formula, and then pivot the data set afterwards.

D2 (copied down):
Code:
=IF(COUNTIFS($A$2:$A$65536,A2,$B$2:$B$65536,B2,$C$2:$C$65536,C2)<=1,0,0.5)


ItemDateTime/AM-PMDup Item Count
Apple4/5/2019AM0.5
Apple4/5/2019AM0.5
Apple4/6/2019AM0.5
Apple4/6/2019AM0.5
Apricot4/5/2019AM0
Apricot4/5/2019PM0
Banana4/5/2019AM0
Banana4/5/2019PM0
Banana4/6/2019AM0.5
Banana4/6/2019AM0.5
Carrot4/5/2019AM0
Carrot4/6/2019AM0.5
Carrot4/6/2019AM0.5
Pineapple4/5/2019AM0
Pineapple4/6/2019AM0
WaterMelon4/5/2019AM0
WaterMelon4/5/2019PM0.5
WaterMelon4/5/2019PM0.5
WaterMelon4/6/2019AM0

<tbody>
</tbody>


Pivot Results (I didn't see 4/5 AM as having 2, nor did it come up as having 2 with the formula):

DateTime/AM-PMTotal
4/5/2019AM1
4/5/2019PM1
4/6/2019AM3

<tbody>
</tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,571
Messages
6,131,482
Members
449,653
Latest member
aurelius33

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