+ Reply to Thread
Results 1 to 3 of 3

Sort based on another sheet values

  1. #1
    Forum Contributor
    Join Date
    07-05-2010
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    100

    Sort based on another sheet values

    There are 3 sheets in the attached document. I want to sort sheet 2 based on values in the sheet1 . Once it has got shorted, the values order in the sheet 2 should be same as sheet 1. Additional values that are not in sheet 1,but in sheet 2 should be listed at the end.

    In other words the output should be same as in sheet 3.

    Please help me on this
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Sort based on another sheet values

    Hi

    I would use a helper column on Sheet2
    I inserted a row as a header row first to ensure that all values took place in the eventual sort.

    In cell C2 enter the formula
    =SUMPRODUCT((Sheet1!$A$1:$A$9=Sheet2!A2)*(Sheet1!$B$1:$B$9=Sheet2!B2))

    Then select column A:C and sort by
    Column C Descending
    Column A Ascending

    see attached file
    Attached Files Attached Files
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Sort based on another sheet values

    please check attachement, run code "test"
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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