+ Reply to Thread
Results 1 to 2 of 2

sort date/time

  1. #1
    srroduin
    Guest

    sort date/time

    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

  2. #2
    Tom Ogilvy
    Guest

    RE: 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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1