OFFSET formula to create a dynamic chart based on 2 distinct ranges

benjii

New Member
Joined
Sep 16, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am trying to create a dynamic chart with the OFFSET function to display 2 data ranges of a factory production planning. Below is an image of the planning sheet, where the first row indicates the date, the second row shows the forecast, and row 13 indicates the processed workload. Based on today (indicated by yellow), I would like to compose a rolling horizon graph that shows a range in the past and a range in the future, that moves as the days progress in time.

2022-09-16_16-37-39.png


I managed to create a rolling forecast horizon by creating chart labels in the ‘Formulas’ --> ‘Name Manager’ tab that look back 2 weeks in time:

=OFFSET('Planning sheet'!$D$13;0;COUNT('Planning sheet'!$13:$13)-2;1;14)

For the formula above, the range is dynamic based on finding the last value cell in row 13. The range is 14 days back in time (14 cells to the left), as can be seen in the image above. In addition, I would like to also show the forecast for the next 7 days in the same graph in a dynamic way (row 2). The chart labels should be changed accordingly and have a range of 3 weeks in total.

Since I cannot use the end of a row as an indicator for the dynamic ranges (the forecast extends further in time), I would like to know if I can use the TODAY() function as an indicator for the dynamic ranges. I tried my best to build dynamic ranges with the TODAY() function, but unfortunately I could not make it work. I hope one of you can help me to incorporate these 2 dynamic ranges into one chart. Thank you in advance.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,215,475
Messages
6,125,028
Members
449,205
Latest member
Eggy66

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