How to align end-of-month chart points with date axis vertical gridlines?

machinehead

New Member
Joined
Jul 30, 2016
Messages
2
I'm charting 60 months of end-of-month data in a line chart. On the horizontal date axis, Excel treats months as beginning on the first day of the month (e.g., 7/01/2016).

But the plotted data points don't coincide with the vertical gridlines. For instance, the data point for 6/30/2016 plots to the left of the 7/01/2016 vertical gridline, while the data point for 7/29/2016 plots an equal distance to the right of the 7/01/2016 vertical gridline. This creates ambiguity in reading the chart, since the end-of-month dates are plotting as if they were mid-month dates, in relation to the vertical gridlines.

Changing the date axis to a text axis doesn't make any difference. Any way to force Excel to plot monthly data points ON the vertical gridlines?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi and welcome to the MrExcel Message Board.

I does not seem to be easy, does it. But I expect you knew that. :)

Using month numbers might work for you i.e. 1 to 60.

I cannot get whole grid lines but you can get tick marks on the x-axis at the right places by formatting the dates as "YYYY-MM" then use a Line Chart rather than a Scatter Chart. Tick Marks can be added via Axis formatting options.


Excel 2013
CDE
1DateAxisQty
231/01/20112011-017
328/02/20112011-029
431/03/20112011-031
530/04/20112011-048
631/05/20112011-050
730/06/20112011-064
831/07/20112011-073
931/08/20112011-086
1030/09/20112011-092
1131/10/20112011-102
1230/11/20112011-114
1331/12/20112011-122
Sheet1
Cell Formulas
RangeFormula
C2=EOMONTH(DATE(A2,B2,1),0)
D2=TEXT(C2,"YYYY-MM")


I hope this helps,

Regards,
 
Upvote 0
Thank you, Rick.

In testing your solution, I saw for the first time that at the bottom of the "Format axis" dialogue box, the option is given to Position axis either "on tick marks" or "between tick marks."

Changing the setting to "on tick marks" solves my problem at one stroke. As usual, Microsoft's boffins have chosen precisely the opposite default setting that any sensible person would select.

Thank you for helping me discover this easy fix! :)
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,603
Members
449,038
Latest member
Arbind kumar

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