Change x Axis in Dynamic Chart According to Data Displayed

Simonc64

Active Member
Joined
Feb 15, 2007
Messages
251
Office Version
  1. 365
Morning All, hopefully someone will be able to give me the final piece of my puzzle!

I have created a chart using a named range and different data is selected using a drop down list. This very nicely shows monthly activity for the last year.

However it occurred to me that my user might want to see just the last 3 months, or the last 6 months of activity. So I have amended the data source and everything works fine EXCEPT that the chart still plots the full 12 months on the x axis - so I have a chart with 12 months bit where only 3 show activity. What I would like to do if possible is, when i choose 3 months data (say Apr - Jun, i need the x axis to show Apr - Jun and not Apr - Mar, or if i choose 6 months to display (Apr - Sep) the x axis shows Apr - Sep not Apr - Mar.........and so on.

To keep it simple i want to keep the data at 12 months or 9 months or 6 months or 3 months but with the x axis changing accordigly.

Any help gratefully recieved - thanks !

Simon
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Let's say it's an XY plot , your X axis is the time axis and you have 12 months of data. If you want to plot a narrower date range, you do it by setting the .MinimumScale and .MaximumScale properties of the X axis (category axis).
 
Upvote 0
Thanks for the suggestion, I eventually foumd a way of doing it via using OFFSET and MATCH
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,796
Members
449,095
Latest member
m_smith_solihull

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