locked
Plot Time on X-axis of Excel Chart RRS feed

  • Question

  • I have two columns. One is a date with time column while the other is some arbitrary number. I need the date and time column to plot on the x-axis but as 0 as minimum value to the maximum being the difference between the first and last date in my column of date and times.

    So, I have a series of values:

    7/31/2012 13:25:35 123

    7/31/2012 13:25:36 133

    7/31/2012 13:25:38 142

    7/31/2012 13:25:42 145

    7/31/2012 13:25:55 642

    7/31/2012 13:26:05 372

    I want the x axis to plot 0 to 30 since the difference between the min and max would be 30 secs. I know I can create additional calc columns in my data and then graph that resultant data, but would rather graph the actual data since i will be removing and adding new on a continuous basis.

    Any ideas?

    Thanks a bunch!

    Tuesday, July 31, 2012 3:36 PM

Answers

  • You need to use a helper column, with

    =(A2-$A$2)*3600*24

    copied down. This will out 0 in row 2, and calculate the difference in seconds from the start for each data point. You can still add data - just copy the cell with this formula down to match your data or overwrite your existing data.


    HTH, Bernie


    Tuesday, July 31, 2012 7:07 PM

All replies

  • You need to use a helper column, with

    =(A2-$A$2)*3600*24

    copied down. This will out 0 in row 2, and calculate the difference in seconds from the start for each data point. You can still add data - just copy the cell with this formula down to match your data or overwrite your existing data.


    HTH, Bernie


    Tuesday, July 31, 2012 7:07 PM
  • Hi,

    I think it cannot be done without a calculated column.

    And I have tried the formula of Bernie’s, I think it’s helpful to you.


    Jaynet Zhang

    TechNet Community Support

    Wednesday, August 1, 2012 6:43 AM
  • Thanks Bernie,

    I am already doing this via a calc column so I should be okay.  Just wanted to make sure there wasnt a more elegant way of doing this.

    THanks a bunch!

    Wednesday, August 1, 2012 12:50 PM