+ Reply to Thread
Results 1 to 22 of 22

how to match and order a column according to values in another column

  1. #1
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    how to match and order a column according to values in another column

    Hello,

    I have a column in(A )that i don't want to change and another column in (B) and Column (C)

    I want to match and order column(B) according to column (A)
    while changing the values of (C) to the changing in (B)

    for example:

    Column A

    TCGA-A2-A3XY
    TCGA-XX-A89A
    TCGA-B6-A0I2

    Please Login or Register  to view this content.
    will change to be

    Please Login or Register  to view this content.
    and so on

    how can I do that?
    Last edited by Marwah; 02-26-2017 at 03:13 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: how to match and order a column according to values in another column

    Hi, welcome to the forum

    Not really sure I understand what you want here, but if you are looking for a formula way to sort text, thats not easy - which comes 1st, Friday or cat?

    I suggest you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    I have attached the data is it uploaded?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    so if you look at column A , I don't want to change
    I want columns B to be the same as column A ( match and order)
    and column C will change according to column B

  5. #5
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: how to match and order a column according to values in another column

    If "I2" is TCGA-A2-A3XY

    In "L2"
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In "M2"
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Array formula [SHIFT+CTRL+ENTER]


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  6. #6
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    I'm confused now
    I have uploaded the data with making I2= A2 and so on
    the making L2=B2 and so on
    M2=C2 and so on

    Just look at my uploaded file
    Last edited by Marwah; 02-26-2017 at 02:01 AM.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: how to match and order a column according to values in another column

    You wont be able to change B or C with formulas, you try this in a helper column (I used E and F...
    A
    B
    C
    D
    E
    F
    1
    2
    TCGA-A2-A3XY TCGA-5L-AAT0 WHITE TCGA-A2-A3XY BLACK
    3
    TCGA-XX-A89A TCGA-5L-AAT1 WHITE TCGA-XX-A89A WHITE
    4
    TCGA-B6-A0I2 TCGA-A1-A0SP NA TCGA-B6-A0I2 WHITE
    5
    TCGA-LL-A6FP TCGA-A2-A04V WHITE TCGA-LL-A6FP WHITE
    6
    TCGA-EW-A423 TCGA-A2-A04Y WHITE TCGA-EW-A423 WHITE
    7
    TCGA-E2-A15K TCGA-A2-A0CQ BLACK TCGA-E2-A15K WHITE
    8
    TCGA-E2-A56Z TCGA-A2-A1G4 WHITE TCGA-E2-A56Z BLACK
    9
    TCGA-E2-A1LB TCGA-A2-A25A WHITE TCGA-E2-A1LB BLACK
    10
    TCGA-E2-A15O TCGA-A7-A0CD WHITE TCGA-E2-A15O BLACK
    11
    TCGA-E2-A152 TCGA-A7-A13G WHITE TCGA-E2-A152 WHITE
    12
    TCGA-D8-A1XC TCGA-A7-A26E WHITE TCGA-D8-A1XC WHITE
    13
    TCGA-E9-A295 TCGA-A7-A26F WHITE TCGA-E9-A295 WHITE
    14
    TCGA-D8-A1JF TCGA-A7-A26H WHITE TCGA-D8-A1JF WHITE

    E2=INDEX(B:B,MATCH($A2,$B:$B,0))
    copied down and across

  8. #8
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    I guess what I need is columns E and F
    how did you find them ??

  9. #9
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    E2=INDEX(B:B,MATCH($A2,$B:$B,0)) doesnt give me F column in your post but it repeats column A

  10. #10
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    please tell me how did you find column F

  11. #11
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    @avk could you please redo the match according to the file I uploaded please

  12. #12
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: how to match and order a column according to values in another column

    Dear Marwah, File attach for your ready ref. using index match with criteria column "I"
    Attached Files Attached Files

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: how to match and order a column according to values in another column

    Quote Originally Posted by Marwah View Post
    E2=INDEX(B:B,MATCH($A2,$B:$B,0)) doesnt give me F column in your post but it repeats column A
    So show us in your file, what you want. that way we can all stop guessing

  14. #14
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    @FDibbins found column F which I would like to get.

    @avk can you help with that ?

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: how to match and order a column according to values in another column

    Quote Originally Posted by Marwah View Post
    @FDibbins found column F which I would like to get.

    @avk can you help with that ?
    Show us in your file, what you want

  16. #16
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    I want to get column F that you created

  17. #17
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: how to match and order a column according to values in another column

    Ok, I have asked twice for you to provide a sample file showing what your expected outcome would look like, but you seem not to want to do that, so perhaps another member will be able to better guess what you want.

    Best of luck

  18. #18
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    I will say it in a better way
    so the first value in Column A2 is TCGA-A2-A3XY
    then I search for this value in column B the I found it ,, I look and the race next to it in C then it is Black and create the following


    TCGA-A2-A3XY black
    TCGA-XX-A89A white

    and so one
    Attached Files Attached Files
    Last edited by Marwah; 02-26-2017 at 03:19 AM.

  19. #19
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    @FDibbins I just finished doing the file sorry for being late

  20. #20
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    @avk
    I will say it in a better way
    so the first value in Column A2 is TCGA-A2-A3XY
    then I search for this value in column B the I found it ,, I look and the race next to it in C then it is Black and create the following


    TCGA-A2-A3XY black
    TCGA-XX-A89A white

  21. #21
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: how to match and order a column according to values in another column

    Did you mean result as per column "C". Search in column "B" based criteria on column "A" . If this is correct, plz refer attach file.
    Attached Files Attached Files

  22. #22
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: how to match and order a column according to values in another column

    Thank you, yes that is what i need

+ 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] Count number of unique values in Column A that match a term in Column B
    By frsaxon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-29-2016, 07:22 AM
  2. Replies: 2
    Last Post: 12-30-2013, 08:15 AM
  3. Compare values in column a to column b, and put it in column c if they match
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2013, 07:52 PM
  4. Replies: 1
    Last Post: 12-09-2012, 05:38 PM
  5. Matching column values in 2 sheets and copying another column over if match
    By cuberis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2012, 06:55 PM
  6. Replies: 11
    Last Post: 08-07-2012, 03:19 PM
  7. [SOLVED] Match Column Order
    By TonyforVBA in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2012, 08:09 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