Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Excel Query

  • 05-06-2007 12:19PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 1,193 ✭✭✭Wolff


    vlookup will do the trick


  • Registered Users, Registered Users 2 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, Registered Users 2 Posts: 529 ✭✭✭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, Registered Users 2 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