Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Sylviags
 
Posts: n/a
Default how do you format cells by time?

I am trying to sort times by earliest to latest on excel.
EX: I want this 8:30am-9:30am
9:45am-12:00pm
12:45pm-1:30pm
2:00pm-3:45pm

I have this 2:00pm-3:45pm
9:45am-12:00pm
8:30am-9:30am
12:45pm-1:30pm
I have them mixed up, but how do I format them to work in ascending order by
time??
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

You need to create a helper column to extract the end time into, and sort on
that column.

This will extract the time

=TIME(MID(A1,FIND("-",A1,4)+1,FIND(":",A1,4)-FIND("-",A1,4)-1),MID(A1,FIND("
:",A1,4)+1,2),0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sylviags" wrote in message
...
I am trying to sort times by earliest to latest on excel.
EX: I want this 8:30am-9:30am
9:45am-12:00pm
12:45pm-1:30pm
2:00pm-3:45pm

I have this 2:00pm-3:45pm
9:45am-12:00pm
8:30am-9:30am
12:45pm-1:30pm
I have them mixed up, but how do I format them to work in ascending order

by
time??



  #3   Report Post  
CyberTaz
 
Posts: n/a
Default

Hi Sylvia-

If each line of the content you posted is stored in a single cell, you do
_not_ have times stored as data, you have text strings. Therefore, neither
A-Z or Z-A will give you the order you want.

One option is go to ToolsOptionsCustom Lists and create a Custom List
based on the content of your column. Once defined, the custom list can be
used for sorting if you click in the appropriate column and go to DataSort.
Click the 'Options' button in the lower left corner of the dialog box, open
the 'First key sort order' list & choose your custom list. Then click OK in
each dialog box.

HTH |:)

"Sylviags" wrote:

I am trying to sort times by earliest to latest on excel.
EX: I want this 8:30am-9:30am
9:45am-12:00pm
12:45pm-1:30pm
2:00pm-3:45pm

I have this 2:00pm-3:45pm
9:45am-12:00pm
8:30am-9:30am
12:45pm-1:30pm
I have them mixed up, but how do I format them to work in ascending order by
time??

  #4   Report Post  
Carole O
 
Posts: n/a
Default

How about 24 hour time (0:00 = midnight, 6:00 = 6 a.m., 12:00 = noon, 18:00 =
6 p.m.). In your example, it would be 08:30-09:30
09:45-12:00
12:45-13:30 (add 12 to
the hour)
14:00-15:45

Hope this helps,

Carole O

"Sylviags" wrote:

I am trying to sort times by earliest to latest on excel.
EX: I want this 8:30am-9:30am
9:45am-12:00pm
12:45pm-1:30pm
2:00pm-3:45pm

I have this 2:00pm-3:45pm
9:45am-12:00pm
8:30am-9:30am
12:45pm-1:30pm
I have them mixed up, but how do I format them to work in ascending order by
time??

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
time format Oonagh Excel Worksheet Functions 2 April 6th 05 03:08 PM
How do I get brackets in format cells accounting? allan Excel Discussion (Misc queries) 2 February 12th 05 10:08 PM
My sheet is unprotected, but I can't format cells. Paul Excel Discussion (Misc queries) 2 February 9th 05 11:20 PM
time format multiplied by hours worked ? Brett Excel Worksheet Functions 2 January 11th 05 01:11 AM
Subtracting time in date format Collcat Excel Worksheet Functions 1 November 10th 04 04:45 PM


All times are GMT +1. The time now is 03:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"