If IDs match in a column, then subtract date ranges formula needed

trankim

Board Regular
Joined
Nov 14, 2009
Messages
192
Hi,
I am hoping that someone can help me calculate to see if there's an identical match in column A, then to subtract the latest date from the earliest date (in days). There are instances where some IDs have the same date and time stamp (which is an anomaly) but I am not sure how to flag those scenarios. There's not that many scenarios where we would have "3 or more that" match with the exact times, and I can delete those manually if need be. However, the first question would be to just subtract the two dates if the IDs match.

Example is for the first ID "58110594", the end result would be 171 days
[TABLE="width: 285"]
<tbody>[TR]
[TD]58110594[/TD]
[TD="align: right"]9/17/11 2:49 AM[/TD]
[/TR]
[TR]
[TD]58110594[/TD]
[TD="align: right"]3/6/12 1:13 AM[/TD]
[/TR]
[TR]
[TD]642624883[/TD]
[TD="align: right"]2/8/12 1:36 AM[/TD]
[/TR]
[TR]
[TD]642624883[/TD]
[TD="align: right"]3/7/12 12:06 AM[/TD]
[/TR]
[TR]
[TD]642624883[/TD]
[TD="align: right"]2/8/12 1:36 AM[/TD]
[/TR]
[TR]
[TD]352182[/TD]
[TD="align: right"]12/29/11 3:38AM[/TD]
[/TR]
[TR]
[TD]352182[/TD]
[TD="align: right"]5/3/12 9:21 AM[/TD]
[/TR]
[TR]
[TD]800934[/TD]
[TD="align: right"]3/20/12 3:08 AM[/TD]
[/TR]
[TR]
[TD]800934[/TD]
[TD="align: right"]3/20/12 3:08 AM[/TD]
[/TR]
[TR]
[TD]927753[/TD]
[TD="align: right"]7/2/12 11:06 AM[/TD]
[/TR]
[TR]
[TD]927753[/TD]
[TD="align: right"]5/14/12 3:57 PM[/TD]
[/TR]
[TR]
[TD]927753[/TD]
[TD="align: right"]8/15/12 3:47 PM[/TD]
[/TR]
</tbody><colgroup><col><col></colgroup>[/TABLE]
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
try this

Excel 2003
ABC
1581105949/17/2011 2:49
2581105943/6/2012 1:13171
36426248832/8/2012 1:36
46426248833/7/2012 0:0628
56426248832/8/2012 1:36-28
635218212/29/2011 3:38
73521825/3/2012 9:21126
88009343/20/2012 3:08
98009343/20/2012 3:080
109277537/2/2012 11:06
119277535/14/2012 15:57-49
129277538/15/2012 15:4793
Sheet3
Cell Formulas
RangeFormula
C2=IF(A2=A1,B2-B1,"")
 
Upvote 0
thanks....question, the problem that I have would be if the IDs are not in order. could we have a formula that looks at matching IDs.....
 
Upvote 0

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