+ Reply to Thread
Results 1 to 4 of 4

Advanced Sort Range of Cells

  1. #1
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Cape Town South Africa
    MS-Off Ver
    Excel 2007
    Posts
    133

    Advanced Sort Range of Cells

    Hi All

    I need a macro that can sort a range of cells horizontally as opposed to the normal vertical sort. The criteria for the sort is in row 1 of the worksheet. The data is not contiguous so this causes a problem, wondering if any-one has a solution.
    Please find attached workbook sheet1 is the problem and sheet 2 what the data should look like after running the macro. One Caveat, the range varies in size.

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Advanced Sort Range of Cells

    Try select range "B1:P19" -> Click "Sort & Filter" -> Custom Sort -> Options

    Select "Sort Left to right" click "Ok"

    Sort by "Row1", Sort on "Values", Order "Smalest to Largest" click "Ok"

    Alf

  3. #3
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Cape Town South Africa
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: Advanced Sort Range of Cells

    Thanks Alf , never new excel had that inbuilt. !!

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Advanced Sort Range of Cells

    Thanks for feed back and rep!

    never new excel had that inbuilt.
    Well Excel moves in mysterious ways its miracles to perform!

    Alf

+ 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