Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Plotting Times of Day.
by Allen Wyatt
(last updated January 18, 2014)
Richard has some source data that shows the date and time displayed in the format dd/mm/yy hh:mm, but when he creates a chart from that data, the only thing that is plotted is the date. He is wondering if there is a way of plotting the times on the chart, as well as the date.
There are several ways you can approach this issue, depending on the type of chart you want to create. If you create an X-Y scatter chart, the date and time should plot automatically. This is not the case if you choose to create a bar, column line, or any other type of chart. In those cases, the X axis is created from equally spaced values, so you won't get exactly what you want.
If you don't want to use a scatter chart, then you could simply modify the data in your source. Add a column that represents the hour of the day, derived through the HOUR function. For instance, if you have your date and time in column B, add a column C and fill it with formulas such as =HOUR(B3). The result is a bunch of numbers representing the hour of the day, 0 through 23. This can chart very easily in any manner desired.
If that doesn't fit your needs, then go ahead and create the chart as you normally would. Then, if you are using Excel 2007 or Excel 2010 right-click the X axis and choose Format Axis from the Context menu. You should see the Format Axis dialog box and choose Number at the left of the dialog box. (See Figure 1.)
Figure 1. The number options of the Format Axis dialog box.
You can display the equivalent controls in Excel 2013 by right-clicking the axis and choosing Format Axis from the Context menu. Excel displays the Format Axis pane at the right side of the screen. The pane should already be set to Axis Options | Axis Options (sounds redundant; I know). All you need to do is expand the Number group at the bottom of the pane.
Choose one of the formats for the axis under either the Date or Time categories. You may have to play a bit with your selection, experimenting to find out what works best. Quite honestly, what works best in one situation won't necessarily work best in another because of the nature of the data being charted.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9547) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Plotting Times of Day.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
One type of chart that Excel allows you to create is one that occupies an entire worksheet. When it comes time to print such ...Discover More
If you add callouts using the drawing tools in Excel, you may have noticed that they don't always stay where you expect them ...Discover More
Want to change an existing bar chart to a different type of chart, such as a line chart or a column chart? It's easy to do ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.