+ Reply to Thread
Results 1 to 9 of 9

Sort the Values in Column A in Ascending Order & Extract Corresponding Values

  1. #1
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Sort the Values in Column A in Ascending Order & Extract Corresponding Values

    Looking for non-array formula to look into A2:D10 and Sort the Values column A into column F2:F10 in ascending order and extract corresponding (Employee ID, Req. and Req. Date) values for the names in column A into G2:I10. Desired outcome is in F2:I10. See sample file.

    Thanks
    Attached Files Attached Files
    Last edited by bjnockle; 05-11-2021 at 08:34 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2020
    Location
    Thailand
    MS-Off Ver
    Office 2016
    Posts
    897

    Re: Sort the Values in Column A in Ascending Order & Extract Corresponding Values

    Hi bjnockle,

    Please the the attached file with a non-array formula to get the resultat you had.
    We are using a helper column.
    Note you have dublicates in the Name column by which you want to sort. The formula used allows for that.
    Hope this helps.
    Attached Files Attached Files
    If your Question is answered; please mark it SOLVED. If you are happy with a member's solution, say 'Thanks' and click the 'Star' to Add Reputation.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,471

    Re: Sort the Values in Column A in Ascending Order & Extract Corresponding Values

    Below solution sorts first 3 characters, if duplicate, sorts the date in column D, the older, the first.
    F2:
    Please Login or Register  to view this content.
    Drag down and accross.
    Attached Files Attached Files
    Quang PT

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Sort the Values in Column A in Ascending Order & Extract Corresponding Values

    Please try at F2

    =INDEX(A$1:A$10,MOD(AGGREGATE(15,6,COUNTIFS($A$2:$A$10,"<"&$A$2:$A$10)*10^6+ROW($A$2:$A$10),ROWS(F$2:F2)),10^6))
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,594

    Re: Sort the Values in Column A in Ascending Order & Extract Corresponding Values

    In F2 then copied down
    Please Login or Register  to view this content.
    In G2 then copied across and down
    Please Login or Register  to view this content.
    Blank rows (11 to 19) are also included in formula to take care data entry in future without changing formula.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 05-12-2021 at 01:00 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,594

    Re: Sort the Values in Column A in Ascending Order & Extract Corresponding Values

    One more way with helper column E and very simple formulas.
    In E2 then down

    =IF($A2="","",COUNTIF($A$2:$A$19,">="&A2)-ROW()*0.0001)

    For table in R2 then copied across

    =IFERROR(INDEX(A:A,MATCH(LARGE($E$2:$E$19,ROWS(E$2:E2)),$E$2:$E$19,0)+ROW(E$1)),"")
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Sort the Values in Column A in Ascending Order & Extract Corresponding Values

    Bo_Ry: When I extended A$1:A$10 to A$1:A$19, the start row number for the first sorted value is F11 instead of F2. Please help take a look and fix. See sample file.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Sort the Values in Column A in Ascending Order & Extract Corresponding Values

    Another option is to use PivotTable.
    Attached Files Attached Files

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Sort the Values in Column A in Ascending Order & Extract Corresponding Values

    Try at F2

    =IFERROR(INDEX(A$1:A$19,MOD(AGGREGATE(15,6,COUNTIFS($A$2:$A$19,"<"&$A$2:$A$19)/($A$2:$A$19<>"-")*10^6+ROW($A$2:$A$19),ROWS(F$2:F2)),10^6)),"")
    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)

Similar Threads

  1. [SOLVED] Sort values in ascending order, match each value in cell and pull values to match
    By bjnockle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-27-2018, 06:21 AM
  2. [SOLVED] Formula to Sort values in ascending order and match each value in cell
    By bjnockle in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-27-2018, 06:18 AM
  3. [SOLVED] Extract unique limited, number of values based on criteria in ascending order
    By Villalobos in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-03-2017, 04:56 AM
  4. [SOLVED] Sort values in ascending order
    By bjnockle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-28-2015, 10:21 PM
  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. Replies: 3
    Last Post: 09-08-2012, 09:23 AM
  7. [SOLVED] Auto Sort values drawn from a VLookup table into ascending order?
    By dsklein85 in forum Excel General
    Replies: 9
    Last Post: 05-02-2012, 09:53 AM

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