+ Reply to Thread
Results 1 to 5 of 5

Sorting Time according to Accending Order

  1. #1
    Registered User
    Join Date
    11-17-2011
    Location
    Sri lanka
    MS-Off Ver
    Excel 2003
    Posts
    34

    Unhappy Sorting Time according to Accending Order

    SORTING.xls


    in the attached sheet there can be data relevant to 1-40 checks.(number of checks vary from 1-40,in the example in the attachment consist with 10 checks)
    The data according to relevant check is displayed in rows 11-16.(in the example, starting time of the check under check number 1 is displayed in cell C14).

    What i need to do is, i have to organize the given data in ascending order in order to starting time.
    As an example i have inserted some data for 10 checks.they are not in ascending order in order to starting time.Since the starting time under check number 2 is the smallest, all the data under check number 2 should be stored under check number 1.Since the starting time of the check under check number 7 is the next smallest,all the data under check number 7 should be stored under check number 2.this should be done for all the inserted data.

    is there any macro or method that i can do above task successfully?
    please help me to handle this problem
    thanks
    Last edited by rsami; 12-14-2011 at 11:17 AM.

  2. #2
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: Sorting Time according to Accending Order

    Try this VBA for vertical sorting.
    select the range (C10:L16 in this case) and run the macro

    VBA Code is below
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: Sorting Time according to Accending Order

    one small correction
    [a1] = [a1] + 1 < this line doen't required pls remove

  4. #4
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: Sorting Time according to Accending Order

    It does not require this complication to sort left to right.
    Excel have option to sort from left to right, You will find left right sort from the Sort Options.

    Sorry for the complication.

  5. #5
    Registered User
    Join Date
    11-17-2011
    Location
    Sri lanka
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Sorting Time according to Accending Order

    Quote Originally Posted by Sadath31 View Post
    It does not require this complication to sort left to right.
    Excel have option to sort from left to right, You will find left right sort from the Sort Options.

    Sorry for the complication.

    thanks very much for your help.
    actually i tried your Macro as well as sort from left to right.
    both are work perfectly as i expected.
    again thanks very much!!!

+ 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