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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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,214,411
Messages
6,119,346
Members
448,888
Latest member
Arle8907

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