# Calculating Average Time Between Rows in a Range of Non-Consecutive Rows

#### aferoz

##### New Member
This may be a simple question, but I've been having trouble getting to the correct result. I have a spreadsheet of production data. I've created a macro that will loop through a list of workers and filter based on the date and the worker. I then calculate some summary statistics for each worker. One of the columns, I'm working with is the time that each job was started. So for example:

Confirmation time
8:39:11 AM
8:52:04 AM
8:52:29 AM
9:08:48 AM
9:09:29 AM
9:10:03 AM
9:11:09 AM
9:20:51 AM

I want to calculate the average time between all rows, aka consecutive orders. I was thinking this may be just a simple standard deviation, but the results don't seem right...
The main problem I'm running into is that these rows are not consecutive since the spreadsheet was filtered.

Any guidance or suggestions would be much appreciated.

### Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

#### JoeMo

##### MrExcel MVP
Copy the filtered data to another sheet. In the example below that's Sheet4.
Excel Workbook
AB
1Confirmation timeDiff in Minutes
28:39:11 AM
38:52:04 AM12.88
48:52:29 AM0.42
59:08:48 AM16.32
69:09:29 AM0.68
79:10:03 AM0.57
89:11:09 AM1.10
99:20:51 AM9.70
10Average in minutes5.95
Sheet4

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Threads
1,168,108
Messages
5,857,428
Members
431,879
Latest member
KiwDaWabbit

### 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

### 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