Dynamic formula to calculate automatically progressive differences between same periods of two years

vladimiratanasiu

Active Member
Joined
Dec 17, 2010
Messages
347
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello!

I have the table Utilities ( Utilities.xlsx ), that shows the energy consumption of a small company. The table includes also monthly and annual values (cubic meters and KWh) of the natural gas. They are fix and progressive differences at the end of each sub-table, comparing power consumption (+/-%) between two consecutive years. Fix differences address medium consumption of total quantity from a moment of the year, distributed equally / 12 months; whereas the progressive ones aim at medium consumption of the same quantity, but distributed equally over all months, from the first to current / last registered one only (e.g. Jan-Sep 2022, Jan-Jul 2023 etc.). I need a formula to calculate automatically (+/-%) the progressive difference between same periods of two consecutive years (e.g. cells C79, C99, C119), comparing them dynamically when new monthly values are added in the most recent year.

Thank you!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
In C39:

Excel Formula:
=-(1-(SUM(C24:C35)/SUM(C4:OFFSET(C4,0,0,COUNT(C24:C35)))))

And then copy to all the progressive annual differences.

Another option, avoiding the use of OFFSET, which is volatile:

Excel Formula:
=-(1-(SUM(C24:C35)/SUM(C4:INDEX(C4:C15,COUNT(C24:C35)))))


This question seems to be related to the thread:


Duplicate question?
 
Last edited:
Upvote 0
Solution
In C39:

Excel Formula:
=-(1-(SUM(C24:C35)/SUM(C4:OFFSET(C4,0,0,COUNT(C24:C35)))))

And then copy to all the progressive annual differences.

Another option, avoiding the use of OFFSET, which is volatile:

Excel Formula:
=-(1-(SUM(C24:C35)/SUM(C4:INDEX(C4:C15,COUNT(C24:C35)))))


This question seems to be related to the thread:


Duplicate question?
No. It is one of my previous message with the same topic, but the structure of its attached table is totally different. So, the requested solution was a different one, too.
 
Upvote 0

Forum statistics

Threads
1,221,825
Messages
6,162,167
Members
451,751
Latest member
Sphen22

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