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 Query

Options
  • 05-06-2007 12:19pm
    #1
    Registered Users Posts: 428 ✭✭


    I have two worksheets (more actualy) one with a list of codes, the second has the codes and descriptions of same. I want to display the descriptions in the column beside the code in the first worksheet.

    WS 1 WS 2
    1 1 a
    1 2 b
    2 3 c
    2 4 d
    2 5 e
    3
    3
    4
    4
    5
    5


Comments

  • Registered Users Posts: 1,186 ✭✭✭Wolff


    vlookup will do the trick


  • Registered Users Posts: 428 ✭✭ROS123


    Wolff, if only it was that easy, should it matter that I could have multiple incidences of the same code e.g. 1 1 1 1 2 2 3 3 3 3 3 4 4 4 4 etc on the top worksheet (data table) but only one incidence of the codes and decriptions in the code table.

    Worksheet 1 has the data code in column one, I want the description in coumn 2 The code table has the code in coumn 1 and the desc in col 2.


  • Registered Users Posts: 530 ✭✭✭bruce wayne


    so lets say the code is on sheet 1 and the first one in in cell a1, then on sheet 2 you have the code (in a1) and the description (in a2) and the list was 100 rows long, the vlookup formula would be

    = vlookup(A1,sheet2!$A$1:$B$100,2,false)

    roughtly translated as
    vlookup(A1, = look up the contents on cell A1,
    sheet2!$A$1:$B$100 = in the range of A1 to B100 on sheet 2,
    ,2 = when you find a match return the contents in the 2nd cell
    ,false = only return a value if there is an exact match

    it does not matter if there is multiple instances on the code on the first sheet, every time is finds a number 1 say, it will return the corrisponding description.


  • Registered Users Posts: 428 ✭✭ROS123


    Bruce, thank you very much for spelling it out for me, it was needed thank you. I am now beginning to get some meaningful information together. I need to find some ways of streamlining it..... Yhat will keep me going for a while.............


Advertisement