If you were doing this manually, you’ll need to revise your formula in the middle of your data set to make your range start from January of the next year.
OFFSET allows you to create dynamic ranges – when you use this with the MONTH() and SUM() functions, you’ve created a smart formula that recognizes when the data goes over to the next year and revises your YTD calculation.
Calculating, YTD price can be a bit trickier.
To get the volume weighted average price, you need to multiply the volume by the price and add each month to the next up to the current month.
Then divide that value by the YTD volume.
This is when knowing how to use Excel’s advanced formulas together can become helpful.
Here the SUMPRODUCT function together with OFFSET can come to the rescue.
Feel free to Download the Workbook HERE.
I'm a 5x Microsoft MVP with over 15 years of experience implementing and professionals on Management Information Systems of different sizes and nature.
My background is Masters in Economics, Economist, Consultant, Oracle HFM Accounting Systems Expert, SAP BW Project Manager. My passion is teaching, experimenting and sharing. I am also addicted to learning and enjoy taking online courses on a variety of topics.