How to have excel work out time difference if case numbers are a duplicate

masterexcelbundle

New Member
Joined
Feb 9, 2022
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Hi, I am trying to work out how long it takes a consultant to complete a case.
What I am hoping to do is, if the case number in column F are the same (duplicated circled in red) then we would work out the difference between the same rows in column D.
I.e. Case number 07313411 as rows F5&F6 match in column F, then the formula would read cells D5&D6 and produce the time difference of 3 minutes (1:05pm to 1:09pm).
There are some times when there are 3 lines of the same case number and they cross over midnight, so have two separate dates.

Thankyou in advance
 

Attachments

  • data set.PNG
    data set.PNG
    29 KB · Views: 10

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi MasterExcelBundle,

Does this do what you want?

MasterExcelBundle.xlsx
ABCDEFG
1Old ValueNew ValueField/EventEdit DateEdited ByCase NumberElapsed Minutes
2OneTwoS09-Feb-22 02:53Nm123 
3OneTwoS09-Feb-22 01:09Nm234 
4OneTwoS09-Feb-22 01:10Nm2341
5OneTwoS09-Feb-22 01:05Nm456 
6OneTwoS09-Feb-22 01:09Nm4564
7OneTwoS09-Feb-22 02:37Nm567 
8OneTwoS09-Feb-22 02:38Nm567 
9OneTwoS09-Feb-22 02:53Nm56716
10OneTwoS09-Feb-22 02:53Nm789 
11OneTwoS09-Feb-22 12:53Nm789 
12OneTwoS10-Feb-22 01:00Nm7891327
13 
Sheet1
Cell Formulas
RangeFormula
G2:G13G2=IF(AND(COUNTIF($F$2:$F$9999,F2)>1,COUNTIF($F$2:$F$9999,F2)=COUNTIF($F$2:$F2,F2)),ROUND((D2-INDEX($D$2:$D$9999,MATCH(F2,$F$2:$F$9999,0)))*1440,0),"")
 
Upvote 0
Solution

Forum statistics

Threads
1,214,944
Messages
6,122,392
Members
449,081
Latest member
JAMES KECULAH

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