Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Excel help!

Options
  • 02-06-2017 12:29pm
    #1
    Registered Users Posts: 53 ✭✭


    Could someone please help me.
    I have three columns.

    First column is like this (numbered 1-5 in different order)
    1
    4
    3
    5
    2

    Second column is 1-5 in correct order
    1
    2
    3
    4
    5

    Third column has data:
    88
    655
    44
    55
    68

    Third column matches 2nd column. As in, number 1 = 88
    2 = 655 etc

    My question:
    I need the data to go in the order of the first column.
    So, I need 1 = 88
    4 = 55
    3 = 44
    5 = 68
    2 = 655

    So I need the data in the order of the first column. How do I do this? Been trying through the sort function. Failing miserably.
    Thank you


Comments

  • Registered Users Posts: 1,648 ✭✭✭wench


    Take a look at the vlookup function


  • Registered Users Posts: 5,124 ✭✭✭homer911


    make sure there is a heading on each column
    Click into any cell in the data range and click on Data > Filter
    Click on the first column heading and select "Sort Smallest to largest"


  • Registered Users Posts: 53 ✭✭wistfuleyes


    homer911 wrote: »
    make sure there is a heading on each column
    Click into any cell in the data range and click on Data > Filter
    Click on the first column heading and select "Sort Smallest to largest"

    They are already done smallest to largest (column b). I need the column c figures to go in the order as specified in column A. I'll have a look at vlookup


  • Registered Users Posts: 53 ✭✭wistfuleyes


    Still can't do this.
    Can someone please help me?
    What do I do with vlookup?
    I put in this formula =blookup(A2,A:C,3,false)
    It's not working. It's not giving the correct answers


  • Registered Users Posts: 20,830 ✭✭✭✭Taltos


    Yup. Use vlookup but move col B & C out of there.
    They'll be your reference cols, but you can't leave them where they are unless you put in a D col and use vlookup then, but that may look messy.


  • Advertisement
  • Registered Users Posts: 53 ✭✭wistfuleyes


    Taltos wrote: »
    Yup. Use vlookup but move col B & C out of there.
    They'll be your reference cols, but you can't leave them where they are unless you put in a D col and use vlookup then, but that may look messy.

    Thanks. It's fine to put the newly sorted data into a D column. However, my formula isn't giving me the right results for some reason??
    Column D is giving me the results as per the order of column B and not column A using my formula. I need them in the order of column A


  • Registered Users Posts: 53 ✭✭wistfuleyes


    I'm just going to update this for anyone who ever encounters the same problem. I got it to work.
    But I had to change my columns around.
    So the correct ordered column listed in order became column A. Column B contained the data. Column C contained the higgledy piggledy order that I needed the data to match up to. Column D became the data column, as per higgledy piggledy order. Formula in column D was =VLOOKUP (C3,A:C,2,False)
    This worked


  • Registered Users Posts: 3,091 ✭✭✭Antar Bolaeisk


    If you're doing something like this in the future the match function combined with either index or indirect functions can provide a similar solution without the requirement of having to have the lookup values in column A.


  • Registered Users Posts: 59,625 ✭✭✭✭namenotavailablE


    Reactivating this thread to show another solution (mod- feel free to delete and apologies if this reactivation is contrary to forum rules):

    2NK0BWH.jpg


Advertisement