Determine the Average Between Two Number Based on a Date Range

snaplink22

Board Regular
Joined
Jul 6, 2018
Messages
129
Hello,

I am looking to create a formula that calculates the average water flow between two meter readings, based on the dates they were recorded. The trick is that the dates of the readings throughout the year do not occur on a fixed interval, and instead are random based on when our technicians arrive on site. Here is an example of what I'm looking at:

Date Reading
1/2/2019 2230390
1/3/2019
1/4/2019
1/5/2019
1/6/2019 (5 days)
1/7/2019 2233735 (Diff. of 3,345 {2233735-2230390})
1/8/2019
1/9/2019
1/10/2019
1/11/2019
1/12/2019
1/13/2019
1/14/2019 (8 days)
1/15/2019 2237200 (Diff. of 3,465 {2237200-2233735})

In the above example there is a span of 5 days between the two readings for the first set and a span of 8 days on the second set. We would then take the difference between the readings (3,345) and divide that by 5 days to get an average of 669, which is our end result number. We would do the same calculation for the second and subsequent steps thereafter. The actual spreadsheet does not show the intervening days. We only input the dates in which a reading is taken, but I included it in the above example for clarity.

We are currently doing this by hand, but having a formula would be much more efficient. Any help the community could provide would be most welcome.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
How about

ZFluff.xlsm
ABC
1
202/01/20192230390
307/01/20192233735669
415/01/20192237200433.125
Data
Cell Formulas
RangeFormula
C3:C4C3=(B3-B2)/(A3-A2)
 
Upvote 0
Boy do I feel like an idiot. That's the formula I created myself, but it was returning a higher value. It turns out that I had selected the wrong cell when creating mine. Thank you for all your help.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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