+ Reply to Thread
Results 1 to 9 of 9

Looking Up Values

  1. #1
    Forum Contributor Stuie's Avatar
    Join Date
    09-17-2006
    Location
    Suffolk, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    432

    Looking Up Values

    i have 2 sheets and on 1 i have a data list and on the other i have a results table.

    data list eg:

    ¦ = Cells

    ¦ Jo ¦ 35 ¦ 120 ¦
    ¦ John ¦ 23 ¦ 100 ¦
    ¦ John ¦ 29 ¦ 100 ¦
    ¦ Ben ¦ 32 ¦ 120 ¦
    etc...

    now on the next sheet looks like this:

    ¦ Name ¦ No1 ¦
    ¦ John ¦" "¦
    ¦ John ¦" "¦

    now under No1 on first line i want it to say 23 and on second line 29

    i know i can vlookup the 23 but how do i get the 29 in the cell below??

    need anymore explaination PM me

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Stuie
    i have 2 sheets and on 1 i have a data list and on the other i have a results table.

    data list eg:

    ¦ = Cells

    ¦ Jo ¦ 35 ¦ 120 ¦
    ¦ John ¦ 23 ¦ 100 ¦
    ¦ John ¦ 29 ¦ 100 ¦
    ¦ Ben ¦ 32 ¦ 120 ¦
    etc...

    now on the next sheet looks like this:

    ¦ Name ¦ No1 ¦
    ¦ John ¦" "¦
    ¦ John ¦" "¦

    now under No1 on first line i want it to say 23 and on second line 29

    i know i can vlookup the 23 but how do i get the 29 in the cell below??

    need anymore explaination PM me
    You could defiine the table as starting on the first Match +1

    =VLOOKUP(A2,INDIRECT("Sheet2!A"&2+(MATCH(A2,Sheet2!A2:A10,0))&":B10"),2,FALSE)

    Amended, correctly that formula, for cell C2, using data starting in A2 and a table on Sheet2A2:should be:
    =VLOOKUP(A2,INDIRECT("Sheet2!A"&2+(IF(COUNTIF(A$2:A2,A2)>1,MATCH(A2,Sheet2!A$2:A2,0),0))&":B10"),2,FALSE)

    but this will not find subsequent matches

    ---
    Last edited by Bryan Hessey; 10-09-2006 at 04:00 AM.

  3. #3
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by Stuie
    i have 2 sheets and on 1 i have a data list and on the other i have a results table.

    data list eg:

    ¦ = Cells

    ¦ Jo ¦ 35 ¦ 120 ¦
    ¦ John ¦ 23 ¦ 100 ¦
    ¦ John ¦ 29 ¦ 100 ¦
    ¦ Ben ¦ 32 ¦ 120 ¦
    etc...

    now on the next sheet looks like this:

    ¦ Name ¦ No1 ¦
    ¦ John ¦" "¦
    ¦ John ¦" "¦

    now under No1 on first line i want it to say 23 and on second line 29

    i know i can vlookup the 23 but how do i get the 29 in the cell below??

    need anymore explaination PM me
    you need to add a helper column. if you have names in sheet1 in col A click on any cell in col A right click > Insert... > Entire column. (now names are in col B and other data in col C and D)
    put in A1

    =B1&COUNTIF($B$1:B1,B1) and copy it down.

    in sheet2 use following VLOOKUP in cell B1 and copy it down (I supposed that you entered name in cell A1 downward)

    =VLOOKUP(A1&ROW(A1),Sheet1!A1:C50,3,FALSE)

    Regards.

  4. #4
    Forum Contributor Stuie's Avatar
    Join Date
    09-17-2006
    Location
    Suffolk, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    432
    thats cool m8 cheers but the only problem is i got it to work then i did sumthin and cant get it goin again...

    if i send u a sample cud u put it in so i can c what im doin wrong??

  5. #5
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by Stuie
    thats cool m8 cheers but the only problem is i got it to work then i did sumthin and cant get it goin again...

    if i send u a sample cud u put it in so i can c what im doin wrong??
    post here sample.

  6. #6
    Forum Contributor Stuie's Avatar
    Join Date
    09-17-2006
    Location
    Suffolk, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    432
    cheers dude
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by Stuie
    cheers dude
    see attached
    you should not merge cell, enter name in seperate cells
    Attached Files Attached Files

  8. #8
    Forum Contributor Stuie's Avatar
    Join Date
    09-17-2006
    Location
    Suffolk, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    432
    Dude ur a star thank ya m8... oh and i will remeber about the merge thing

  9. #9
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by Stuie
    Dude ur a star thank ya m8... oh and i will remeber about the merge thing
    you are welcome and thank you for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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