Dynamic Chart Axis - OFFSET function?

Caleeco

Well-known Member
Joined
Jan 9, 2016
Messages
980
Office Version
  1. 2010
Platform
  1. Windows
Hello,

I'm struggling with an Excel chart problem, which Im hoping the community can help me solve!

I have a chart which I wish to make dynamic eg. if the current month is November, the chart axis should display data for Sept, Oct, Nov, Dec, Jan (2 months before & 2 months ahead).

  1. The Data is on sheet called "Summary Sheet"
  2. Cells B3:B26 contain dates, 01/01/2016, 01/02/2016, 01/03/2016.... all the way to 01/12/2017

I have the following formula to work out which month we are in, and what the matching date should be:
Code:
=DATE(YEAR(TODAY()),MONTH(TODAY()), 1)

However, How can I get the chart to use the formula to pick out the correct range from cells B3:B26?

Trying a few things with names ranges, and the OFFSET function.. but not luck yet!

Any help is appreciated (sorry I cannot currently post/upload a picture of my current worksheet)
Thanks
Caleeco
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
you can use offset as below:
Code:
=OFFSET(INDEX($B$2:$B$26,MATCH(EOMONTH(TODAY(),-3)+1,$B$2:$B$26,0)),,,5)

or you can use index as below:
Code:
=INDEX($B$2:$B$26,MATCH(EOMONTH(TODAY(),-3)+1,$B$2:$B$26,0)):INDEX($B$2:$B$26,MATCH(EOMONTH(TODAY(),-3)+1,$B$2:$B$26,0)+4)
 
Upvote 0

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

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