+ Reply to Thread
Results 1 to 8 of 8

Sorting / Matching two columns

  1. #1
    Registered User
    Join Date
    11-14-2017
    Location
    Saudi Arabia
    MS-Off Ver
    MS Office 2016
    Posts
    8

    Sorting / Matching two columns

    Hi,

    I've tried and tested simple =VLOOKUP function on two columns and it's working for sure but I copied data from a file and tried to sort it but it didn't work.

    Here is what I want to do:

    excel_issue.PNG

    I want to match and sort at the same time, column C with column B to get the sorted emails on column A.

    I tried VLOOKUP but didn't work. Any help ?
    Last edited by wolfrose; 09-02-2020 at 02:22 PM. Reason: solved

  2. #2
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    636

    Re: Sorting / Matching two columns

    It is hard to tell what you want to do - maybe upload a spreadsheet with a before sorted example and after sorted example showing what you want the final output to be. Choose Go Advanced Button, Manage Attachments, and upload a sample workbook with two sheets - "What it looks like" & "What I want it to look like "

    Are these 3 columns on the same worksheet? how do the columns relate to each other? are you sorting the columns individually or sorting the whole sheet by a single column?
    If this solves your issue, Mark thread as Solved & Add Reputation.

    Thanks!

  3. #3
    Registered User
    Join Date
    11-14-2017
    Location
    Saudi Arabia
    MS-Off Ver
    MS Office 2016
    Posts
    8

    Re: Sorting / Matching two columns

    OK, I attached the excel file.

    excel_ex.PNG

    Here are 3 columns.

    The green column is the lookup I want to get the matched "id lookup" numbers from the "id index" which is the area I want search into.

    And then get them matched to copy the required emails.

    "id index": is the whole department IDs with emails which is +340 members
    "id lookup": groups of "id index" which is normally from 10 - 30 members

    I want to lookup and match "id lookup" to "id index" and sort them too at the same time.
    Of course "emails" would be sorted with the "id index" matches.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    1,309

    Re: Sorting / Matching two columns

    Wow, it's like working while looking in a mirror or playing left-handed. :-)

    You did not show what the result would look like if it worked as you wanted. Are you looking for a VBA (Macro) answer or are you looking for a formula answer or manual data manipulation answer (using Excel tools - sorting/filtering, etc.)?

    What I don't get either is that in your sample file, NONE of the IDs match the index list. Aren't they supposed to?

  5. #5
    Registered User
    Join Date
    11-14-2017
    Location
    Saudi Arabia
    MS-Off Ver
    MS Office 2016
    Posts
    8

    Re: Sorting / Matching two columns

    Oh .. wait a minute. I did a terrible mistake.

    I copied the wrong id lookups ! They turned out to be phone numbers and not academic numbers.

    What I want is the related emails for a given group numbers of id lookup and get the "match email"

    excel_ex1.png
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    1,309

    Re: Sorting / Matching two columns

    So there will always be just one match per ID? I would think you could just use the Index/Match formula. In D3 enter:
    =INDEX($A$3:$A$342,MATCH(C3,$B$3:$B$342,0))

    Does that give you what you want?

  7. #7
    Registered User
    Join Date
    11-14-2017
    Location
    Saudi Arabia
    MS-Off Ver
    MS Office 2016
    Posts
    8

    Re: Sorting / Matching two columns

    Yep !

    Thank you so much man

  8. #8
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    1,309

    Re: Sorting / Matching two columns

    You're welcome. Glad I could help.

+ 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. Sorting and matching up two columns
    By JamesM94 in forum Excel General
    Replies: 1
    Last Post: 12-27-2018, 04:17 PM
  2. Need help sorting and matching some columns
    By davida7 in forum Excel General
    Replies: 1
    Last Post: 03-20-2017, 04:03 PM
  3. [SOLVED] [Help] Sorting Two Data columns/matching [Help]
    By Mattymul in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-25-2013, 01:06 PM
  4. Matching and Sorting with Two Columns
    By KaySwiss9 in forum Excel General
    Replies: 8
    Last Post: 07-26-2013, 02:22 AM
  5. Replies: 3
    Last Post: 06-09-2011, 05:58 AM
  6. Matching and sorting Data from two different columns?
    By floppychicken in forum Excel General
    Replies: 1
    Last Post: 08-16-2010, 08:44 AM
  7. [SOLVED] Sorting columns and Matching
    By Jeremy in forum Excel General
    Replies: 2
    Last Post: 07-21-2006, 03:00 AM

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