X-Axis Dates Lose Formatting

Written by Allen Wyatt (last updated November 5, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


When Bruce copies a chart from one workbook to another, the dates on the X axis get transformed to five-digit numbers, typically starting with 4. This is a recent issue for Bruce, and he needs to know how to correct it.

There are a few ways you can approach this issue. First, the five-digit numbers (starting with 4) are date serial numbers. They are the numeric values maintained by Excel, internally, to represent dates. Each of those numbers represents the number of days since January 1, 1900. The fact that it is a five-digit number starting with 4 means that the dates are later than July 6, 2009.

The fact that you aren't seeing dates means that your axis values have lost their formatting. You can, if desired, right-click on the axis and choose to format it. Set the format to whatever date format you want, and you should be good to go.

I said "should be" because the problem could be a bit more involved than that. To illustrate, let's say that you create a workbook called Source.xlsx. In this, you have your data and you create an embedded chart based on that data. The chart has a series of dates along the X axis. (See Figure 1.)

Figure 1. Your data and the chart created from the data.

Now you create another workbook, this one called Target.xlsx. You copy the chart from Source.xlsx and paste it twice into Target.xlsx. (See Figure 2.)

Figure 2. Two copies of the chart pasted into the Target.xlsx workbook.

At this point, everything looks fine—the dates look just as expected on the X axis. Before doing anything else, though, select the X axis on the rightmost copy of the chart. Right-click the selected axis and choose Format Axis from the Context menu, and Excel displays the Format Axis task pane at the right side of the screen. (See Figure 3.)

Figure 3. Formatting the X axis.

At the very bottom of the options, you want to clear the Linked to Source check box and then close the task pane. Since this check box is selected, by default, when you paste the chart, you now have one copy of the chart (the left one) that has the option selected and one copy (the right one) that has it cleared.

Now close the Source.xlsx workbook but leave Target.xlsx open. Press F9 to recalculate the workbook, and all of a sudden you'll see that the left copy of the chart now shows the dates in their unformatted condition, just as Bruce was seeing. (See Figure 4.)

Figure 4. Unformatted dates in the left chart.

Interestingly, if you once again open the Source.xlsx workbook, then the dates will again be formatted correctly, automatically. That is because the formatting in the left chart is still linked to the chart in the Source.xlsx workbook.

So, the bottom line is that if you won't always have the source of the chart open while you are working with the target workbook, you'll want to change the format of the X axis (or any axis that contains dates) so that the Linked to Source check box is cleared.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10251) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Copying Subtotals

If you have added subtotals to your worksheet data, you might want to copy those subtotals somewhere else. This is easy ...

Discover More

Three-Dimensional Transpositions

Excel makes it easy to transpose your data so that rows become columns and columns rows. It doesn't have a built-in ...

Discover More

Footnotes for Chapters

Word allows you to add footnotes to your documents and configure how they are numbered. Sometimes the numbering can get a ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Creating a Log/Log Chart

If you need to create a chart that uses logarithmic values on both axes, it can be confusing how to get what you want. ...

Discover More

Changing Chart Size

Place a chart on a worksheet and you may not be satisfied with its size. Changing the size of a chart is a simple process ...

Discover More

Labeling X-Y Scatter Plots

Figuring out how to get the data points in an X-Y scatter plot labeled can be confusing; Excel certainly doesn't make it ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is one less than 9?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.