+ Reply to Thread
Results 1 to 7 of 7

Sort data to match a predefined list order

  1. #1
    Registered User
    Join Date
    11-09-2012
    Location
    London
    MS-Off Ver
    Excel 97
    Posts
    3

    Angry Sort data to match a predefined list order

    Hi,

    I usually manage to find the answer to all my problems within online forums, but this one seems to not exist!

    Basically I have a 4 columned worksheet.

    Product Code
    Description
    Qty
    Price

    I basically want to sort this data by the Product Code, to match the order of product codes in our Warehouse Catalogue, which unfortunately is not in any particular order..

    Any ideas would be greatly appreciated!

  2. #2
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Sort data to match a predefined list order

    Can you attach excel file with desired output and simulation

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Sort data to match a predefined list order

    It will be good if you explain with the help of some excel sample files.

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    10-03-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    38

    Re: Sort data to match a predefined list order

    If your Warehouse Catalogue is in any electronic format, then
    1. copy it into Excel
    2. type 1 in the cell to the right of the first row; 2 in the next and then drag/fill down
    3. save and use this as vlookup source to a new (5th) column in your worksheet called (something shorter than) "WarehouseCatalogueSortOrder".

  5. #5
    Registered User
    Join Date
    11-09-2012
    Location
    London
    MS-Off Ver
    Excel 97
    Posts
    3

    Re: Sort data to match a predefined list order

    Ok, Have attached file.

    Column F is the catalogue order which I need to sort the first 4 column by.

    Hope this is clearer, I can upload other example if that helps.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-03-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    38

    Re: Sort data to match a predefined list order

    How does this seem. It uses "TRIM" as you have spaces in the Product Code.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-09-2012
    Location
    London
    MS-Off Ver
    Excel 97
    Posts
    3

    Re: Sort data to match a predefined list order

    That is perfect. Cheers.

    I didn't even realise there were spaces in the the product code.

    It's gonna be a long week...

+ 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