How to Display Multi-Line Month and Year Labels on an Excel Chart Axis
Question details
The user wants to format the x-axis date labels on an Excel chart so that the month and year are displayed on separate lines (e.g., 'Apr' above '18') to save space and improve readability.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating or formatting an Excel chart where limited horizontal space makes standard date axis labels difficult to read or overlap.
- Observed behavior
- Chart x-axis date labels appear on a single line, causing horizontal clutter or forcing the chart to angle the text when space is restricted.
Ensure your chart's x-axis is currently using valid date values rather than plain text, and verify that you have access to modify the format of the chart axis or the source data cells.
Use a Custom Number Format with a Line Break
Apply a custom date format directly to the chart axis using a keyboard shortcut to force a line break between the month and year.
By utilizing the Ctrl+J shortcut inside the Custom Number Format dialogue, you can insert an invisible carriage return. This splits your date components onto multiple lines, keeping your chart tidy without changing the actual data values.
Right-click the x-axis (horizontal axis) of your chart and select 'Format Axis' from the context menu to open the formatting pane.
In the Format Axis pane, click on 'Axis Options' (the column chart icon), then scroll down and expand the 'Number' section.
Uncheck the 'Linked to source' box. This ensures that the custom format you create will apply directly to the chart axis without being overridden by the worksheet cell formats.
In the Category dropdown, select 'Custom'. In the Format Code text box, type 'mmm', then press Ctrl+J on your keyboard to insert a line break, and type 'yyyy' (or 'yy' for a two-digit year). Click the 'Add' button to apply the format to your axis.

Create and Format Professional Charts Easily with WPS Office
WPS Spreadsheet provides intuitive and powerful chart customization tools, allowing you to easily adjust axis labels, apply complex custom number formats, and create beautiful data visualizations with zero hassle.
- 1. Open your spreadsheet: Launch WPS Spreadsheet and open the file containing your data and the chart you want to modify.
- 2. Access Axis settings: Double-click the x-axis on your chart to instantly open the Format Axis panel on the right side of the screen.
- 3. Apply the custom format: Expand the Number section, select Custom, enter your code like 'mmm' followed by Ctrl+J and 'yy', then apply it to perfectly stack your month and year labels.

Frequently Asked Questions
Why did my chart axis labels suddenly revert to a single line?
If the 'Linked to source' option remains checked in the Format Axis pane, your chart will continuously pull the formatting from the worksheet cells. If the source cells are formatted as a single line, the chart will override your custom axis format. Always uncheck 'Linked to source' to lock your custom multi-line format on the chart.
Can I format the axis to display the day, month, and year on three separate lines?
Yes, you can extend the custom number format by using the line break shortcut multiple times. In the Format Code box, type 'dd', press Ctrl+J, type 'mmm', press Ctrl+J, and type 'yyyy'. This will stack the day, month, and year vertically.
Does the Ctrl+J shortcut work in Excel for Mac?
The Ctrl+J shortcut is specific to Windows. On Excel for Mac, you generally need to use 'Option+Command+Return' or 'Control+Option+Return' to successfully insert a line break inside a custom format text box.




