Thread: sort date/time
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default sort date/time

If the times and dates are in column B, then it is highly likely that you
won't have duplicte times and column N will have little influence on the
sort.

That said, I didn't see any difference in the sort whether it was formatted
to show times or not show times as long as the times were still stored in the
cells.

--
Regards,
Tom Ogilvy


"srroduin" wrote:

I have the following code which worked great when I was sorting only
dates....but it won't sort if I have date and time, 04/02/2006 11:00 format.
What do I have to do differently?

Selection.Sort Key1:=Range("B10"), key2:=Range("N10"), Order1:=xlAscending,
Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal