+ Reply to Thread
Results 1 to 15 of 15

how to organize column according to another column?

Hybrid View

  1. #1
    Registered User
    Join Date
    06-09-2013
    Location
    Campina Grande, Brazil
    MS-Off Ver
    Excel 2013
    Posts
    9

    Question how to organize column according to another column?

    Hello Guys,

    if I have three columns:

    A B C
    X1 X3 3
    X2 X1 7
    X3 X2 9

    want column B and C stay organized according to column A:

    A B C
    X1 X1 7
    X2 X2 9
    X3 X3 3

    where B is adjusted with the A and C fits together with B.

    how can I do this simple formula or macro?

    thank you very much!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: how to organize column according to another column?

    Hi Artur_Indio,

    Welcome to the forum

    Please attach a sample workbook with expected output for better understanding


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    06-09-2013
    Location
    Campina Grande, Brazil
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: how to organize column according to another column?

    for_forum.xlsx

    Sorry, I'll try to explain better. In Annex I to 'Sheet1' I have three columns. The first (column A) to cities in a certain order, the second (column B) with the city that should be in the same order as the city in column A, column C with indices that must fit together with column B.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: how to organize column according to another column?

    May be this...

    In D2 Cell
    Formula: copy to clipboard
    =IF(COUNTIF(B:B,A2),A2,"")


    In E2 Cell
    Formula: copy to clipboard
    =IFERROR(VLOOKUP(A2,B:C,2,FALSE),"")


    Drag both the formula's down...

  5. #5
    Registered User
    Join Date
    06-09-2013
    Location
    Campina Grande, Brazil
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: how to organize column according to another column?

    Quote Originally Posted by :) Sixthsense :) View Post
    May be this...

    In D2 Cell
    Formula: copy to clipboard
    =IF(COUNTIF(B:B,A2),A2,"")


    In E2 Cell
    Formula: copy to clipboard
    =IFERROR(VLOOKUP(A2,B:C,2,FALSE),"")


    Drag both the formula's down...
    the second formula don't work

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: how to organize column according to another column?

    Quote Originally Posted by Artur_Indio View Post
    the second formula don't work
    It should work if possible attach the workbook to check where it fails

  7. #7
    Registered User
    Join Date
    06-09-2013
    Location
    Campina Grande, Brazil
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: how to organize column according to another column?

    for_forum.xlsx
    Quote Originally Posted by :) Sixthsense :) View Post
    It should work if possible attach the workbook to check where it fails
    here, i use the excel in portuguese, then "," is "."

  8. #8
    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
    53,050

    Re: how to organize column according to another column?

    Hi and welcome to the forum

    If the 1st column is sorted alphabetically, then try to sort B & C alpha, based on B
    If this doesnt give you what you need, press CTRL Z to undo and come back here to let us know - well, let us know either way lol
    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

  9. #9
    Registered User
    Join Date
    06-09-2013
    Location
    Campina Grande, Brazil
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: how to organize column according to another column?

    Quote Originally Posted by FDibbins View Post
    Hi and welcome to the forum

    If the 1st column is sorted alphabetically, then try to sort B & C alpha, based on B
    If this doesnt give you what you need, press CTRL Z to undo and come back here to let us know - well, let us know either way lol
    no is not, is a specific order

  10. #10
    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
    53,050

    Re: how to organize column according to another column?

    OK then try this in D2, copied down...
    =VLOOKUP($A2,$B$2:$C$224,1,0)
    and in E2, copied down...
    =VLOOKUP($A2,$B$2:$C$224,2,0)
    I notice there are a few "non-matches", they will show up as #N/A

  11. #11
    Registered User
    Join Date
    06-09-2013
    Location
    Campina Grande, Brazil
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: how to organize column according to another column?

    Quote Originally Posted by FDibbins View Post
    OK then try this in D2, copied down...
    =VLOOKUP($A2,$B$2:$C$224,1,0)
    and in E2, copied down...
    =VLOOKUP($A2,$B$2:$C$224,2,0)
    I notice there are a few "non-matches", they will show up as #N/A
    Work thanks! how to proceed now to avaluate the ans?

  12. #12
    Registered User
    Join Date
    06-02-2013
    Location
    Arkansas, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: how to organize column according to another column?

    is there any plugin to do this function automatically?

  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
    53,050

    Re: how to organize column according to another column?

    ionamartin, please dont ask questions like this on some-one elses thread (its called hijacking lol). Start your own thread, and if you feel it is relevant, post a link back to this thread - and include in your thread what you mean by "any plugin"...these were just regular excel functions

+ 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