Sorting data with time stamps

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a month's worth of data that I would like to sort. On each day two
variables are recorded at fifteen minute intervals for the entire day. I
want to sort the variables based on variable name for the entire month.
However, I cannot apply a basic sort feature because the date is not attached
to any of the variables. The date is listed in a row by itself at the start
of the day and then the fifteen minute readings are listed below. Is there
an easy way to attach the time to each row in my spreadsheet so that I can
sort my data?

To clarify, this is what my spreadsheet looks like, two variable names, the
value and the time (every fifteen minutes) for the entire month.

2006-05-16
HG 7.779 23:30:03
TW 3.59 23:30:03
HG 7.798 23:45:00
TW 3.61 23:45:00
2006-05-17
HG 7.782 00:00:03
TW 3.59 00:00:03

Thanks for your help!
 
It looks like the date is in column A, as well as some indicator. Then
something in column B and finally either an empty cell (for the date rows) or
the time in column C.

If that's true, I'd do this:

Put this in D1:
=A1
(just to "prime the pump")

This goes in D2:
=if(isnumber(a2),a2,d1+c2)
Format that cell as:
mm/dd/yyyy hh:mm:ss
(or what you want, but I'd include both date and time)

Then copy D2 down the column as far as you need.

Convert column D to values
Select column D
edit|copy
edit|paste special|values

Now select your range and sort by that column D.
 
Back
Top