Accumulated volumes to daily volume with missing data

cardsfan13

New Member
Joined
Apr 26, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi, I need help with tracking accumulated volumes (or values) on a daily basis. I have values that come in (typically every week day) that I want to semi-automate with excel to track daily volumes. My issue comes from missing data over the weekends. I want to transform the accumulated volume to a daily value and want to create a formula that I can use going forward to reduce manual work.

The difficulty is that I want to smooth out the data using an average when I have missing values. For example you can see the screen shot shows a period of 2 days without volume. That would mean I'd want to take the value for 1/11 and subtract the value for 1/8 and then average that value across the 3 days to have a daily figure that makes sense. Does anyone know of a way to do this? I tried with IF statements and couldn't figure it out. Ideally I would be able to simply enter accumulated volumes on a daily basis and have the daily value populate for me.
 

Attachments

  • Screen Shot 2022-04-26 at 2.10.39 PM.png
    Screen Shot 2022-04-26 at 2.10.39 PM.png
    171.4 KB · Views: 12

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
You can put this formula in first row of "Daily Volume" column and fill down cells.
Dont forget to replace "A1" in formula with first cell address in your column "Accumulated Volume".
=IFERROR(IF(A1="","",SUMIF($A$1:$A1,">0")/COUNTIF($A$1:$A1,">0")),"")
 
Last edited:
Upvote 0
Welcome to the MrExcel board!

See if this does what you want.

22 04 27.xlsm
ABC
1DateAccumulatedDaily
28/01/20221834543
39/01/2022361.3333333
410/01/2022361.3333333
511/01/20221835627361.3333333
612/01/20221835971344
713/01/20221836342371
814/01/20221836689347
915/01/20221837097408
1016/01/2022326
1117/01/2022326
1218/01/20221838075326
Daily Volume
Cell Formulas
RangeFormula
C3:C12C3=LET(nr,INDEX(FILTER(ROW(B3:B$20),B3:B$20>0),1),pr,MAX(FILTER(ROW(B$2:B2),B$2:B2>0)),(INDEX(B:B,nr)-INDEX(B:B,pr))/(nr-pr))
 
Upvote 0
Welcome to the MrExcel board!

See if this does what you want.

22 04 27.xlsm
ABC
1DateAccumulatedDaily
28/01/20221834543
39/01/2022361.3333333
410/01/2022361.3333333
511/01/20221835627361.3333333
612/01/20221835971344
713/01/20221836342371
814/01/20221836689347
915/01/20221837097408
1016/01/2022326
1117/01/2022326
1218/01/20221838075326
Daily Volume
Cell Formulas
RangeFormula
C3:C12C3=LET(nr,INDEX(FILTER(ROW(B3:B$20),B3:B$20>0),1),pr,MAX(FILTER(ROW(B$2:B2),B$2:B2>0)),(INDEX(B:B,nr)-INDEX(B:B,pr))/(nr-pr))
Hi Peter - this is awesome! I am actually trying to do this in Google Sheets, which doesn't have the LET function... any idea how to work around that? I am trying to figure it out without the LET function, but it is super complicated. Appreciate the help!!
 
Upvote 0
As you have discovered, while Excel and Google Sheets have many similarities, they are NOT the same. So solutions for one may not work in the other.
For this reason, when posting questions about Google Sheets, please do the following:

1. Post them in the appropriate forum. They should NOT be posted to the "Excel Questions" forum, but rather the "General Discussion & Other Applications" forum (note the description of that forum):
1651080185150.png

2. Be sure to clearly state in the title and/or original question that this is, in fact, a "Google Sheets" question, so people who are helping you know what you are using, and can answer appropriately.

I have moved this thread to the appropriate forum for you.
 
Upvote 0
.. doesn't have the LET function... any idea how to work around that?
If it is only the LET function that you don't have then this is the same formula with LET removed.

22 04 27.xlsm
ABC
1DateAccumulatedDaily
28/01/20221834543
39/01/2022361.3333333
410/01/2022361.3333333
511/01/20221835627361.3333333
612/01/20221835971344
713/01/20221836342371
814/01/20221836689347
915/01/20221837097408
1016/01/2022326
1117/01/2022326
1218/01/20221838075326
Daily Volume
Cell Formulas
RangeFormula
C3:C12C3=(INDEX(B:B,INDEX(FILTER(ROW(B3:B$20),B3:B$20>0),1))-INDEX(B:B,MAX(FILTER(ROW(B$2:B2),B$2:B2>0))))/(INDEX(FILTER(ROW(B3:B$20),B3:B$20>0),1)-MAX(FILTER(ROW(B$2:B2),B$2:B2>0)))
 
Upvote 0
Solution
If it is only the LET function that you don't have then this is the same formula with LET removed.

22 04 27.xlsm
ABC
1DateAccumulatedDaily
28/01/20221834543
39/01/2022361.3333333
410/01/2022361.3333333
511/01/20221835627361.3333333
612/01/20221835971344
713/01/20221836342371
814/01/20221836689347
915/01/20221837097408
1016/01/2022326
1117/01/2022326
1218/01/20221838075326
Daily Volume
Cell Formulas
RangeFormula
C3:C12C3=(INDEX(B:B,INDEX(FILTER(ROW(B3:B$20),B3:B$20>0),1))-INDEX(B:B,MAX(FILTER(ROW(B$2:B2),B$2:B2>0))))/(INDEX(FILTER(ROW(B3:B$20),B3:B$20>0),1)-MAX(FILTER(ROW(B$2:B2),B$2:B2>0)))
Thank you Peter for your help! This is a life saver.
 
Upvote 0

Forum statistics

Threads
1,223,939
Messages
6,175,532
Members
452,651
Latest member
wordsearch

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