X Axis labels as month

Expiry

Well-known Member
Joined
Jun 20, 2007
Messages
865
I have a simple chart which I'm plotting daily values on. I don't want daily labels on the x-axis, though.

I'd like to have it say Mar, Apr etc. Only once, neatly in the middle of the 30/31 entries for the month.

Is there a way of doing that within the formatting of the chart?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
If it's a timescale axis, set the min to be the middle of the month before your data starts, set the major unit to be one month and use a "mmm" number format.
 
Upvote 0
That works - almost. My dataset starts on 1st March, so I've set my min to 15th Feb. I now have a blank section of the chart for Feb, to the left of the Y axis, which I don't want.
 
Upvote 0
C'est la vie. You cannot, AFAIK, have everything
 
Upvote 0
You could also use a helper column to show the month, once a month, and use that column to drive your x axis labels.

For example, let's say your daily dates are in the range A1:A365.
In the helper column, put
Code:
=IF(DAY(A1)=15,A1,"")
and format as mmm (or mmmm if you prefer).
Using 15 will put the label roughly in the middle of the month.
Change 15 to some other number if you want to position the label somewhere else.
Copy down as far as required.
Use this helper column as the source for the x axis labels.
Remember to go into Format Axis, Scale, set "Number of Categories between x axis labels" to 1.
 
Upvote 0
I just posted code for similar chart - well it has an axis like you are asking for. I use arrays - but you can input a range instead - same diff

see post - (was posted today)

Re: Tricky Graph question
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,136
Members
452,890
Latest member
Nikhil Ramesh

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