+ Reply to Thread
Results 1 to 3 of 3

I need to create an ascending sort across multiple columns

  1. #1
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    I need to create an ascending sort across multiple columns

    Hello all!

    I have multiple columns of data - varying number of columns each with varying numbers of rows. If the 1st number in column A fits between the 3rd and 4th numbers in column B, I want to move the one in column A down to the proper position and move the numbers in column B that fit AFTER the one in column a to move down, leaving a blank where the number in column A now resides. This needs to continue across however many columns are in a particular sheet and down as many rows as the data takes up.

    Also, if possible, I'd like to insert 2 columns at the left side of the sheet and have the "new" column A show a list of the unique number in that row.

    I'm thinking that I need to start by sorting each column, indiviually, in numeric order.

    Often the sheet I'm working on is 15-20 columns and many rows long, so it's REALLY hard to eye-ball this correctly.

    I know that I don't explain well in words, so I'll attach a workbook showing my original data on Sheet1 and my desired result on Sheet2.

    Any help would be greatly appreciated!

    Jenny
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: I need to create an ascending sort across multiple columns

    Hi Jenny

    I have looked at your data and I think that there is an easy solution to this.

    Insert three new columns to the left of your data.

    Copy all your data into column A

    Use the remove duplicate function to remove duplicates

    in column 3 insert a formula to look for an exact match of the numbers in column A for the numbers in column 4
    If an exact match exists then display the number in column A.

    Copy Paste your values

    Repeat for all your columns

    Delete the last column.

    Simples Really.

    Ok Try this Macro:

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 12-22-2015 at 05:08 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Re: I need to create an ascending sort across multiple columns

    PERFECT!! I just had to make a small adjustment so it would work to the very last column. (Sometimes there are blank columns). Now it's great! You have no idea how much aggravation this will save me. Doing it manually invariably leads to errors, just from tedium.

    You've made my day.

    Thanks

    Jenny

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sort the final digits and sort in ascending order
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2014, 11:58 AM
  2. [SOLVED] sort an array wrt two columns one ascending and the other descending
    By mehmetics in forum Excel General
    Replies: 6
    Last Post: 10-25-2014, 07:49 AM
  3. Replies: 13
    Last Post: 12-19-2013, 11:06 PM
  4. how to arrange multiple columns in ascending order
    By sanjay2210.msl in forum Excel General
    Replies: 2
    Last Post: 10-29-2013, 08:26 AM
  5. How to select two columns of values and sort them into ascending order,but w/o moving them
    By jonathancook in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-10-2013, 05:51 PM
  6. Ascending and descending multiple columns with macro
    By leo73pk in forum Excel General
    Replies: 7
    Last Post: 01-03-2011, 05:28 AM
  7. How to Sort by ascending value for multiple variables?
    By cmf0106 in forum Excel General
    Replies: 2
    Last Post: 10-30-2009, 12:21 PM

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