Excel – How do you plot time on the X axis in excel

chartsmicrosoft excelmicrosoft-excel-2007microsoft-excel-2010microsoft-excel-2011

I need to plot the decay of my phone's battery against time over night. My starting time is 23:17:47 and my ending one is 07:05:49. I don't have any issue in changing the time format in the current one, selecting an XY chart and plotting time on the X axis.

The problem arises because Excel doesn't start the X axis at 23:17:47, but instead at 00:00:00, so my first value is drawn from the end of the graph and the goes back at the beginning when time values are over 00:00:00.

In other words, how do I set up the min time value to 23:17:47 and the max to 07:05:49 in excel?

enter image description here

Best Answer

The key is to include the date. Without the date, Excel has no basis to know that 23:17:47 was from the previous day. I mocked up a couple of values to illustrate.

enter image description here

The date/time values are in column A and the Y values in column B. I selected a scatter plot, which treats the X axis as a continuous variable. The rest is formatting.

The X axis shows just the times because I already used the Format Axis | Number options to select a format that shows just the time. The Axis Options allow you to specify the starting point you want (your question). You can also control the increments shown by setting the major and minor units.