+ Reply to Thread
Results 1 to 4 of 4

Lookup value in row against value in column

  1. #1
    Registered User
    Join Date
    01-13-2004
    Posts
    42

    Lookup value in row against value in column

    Hello,
    My apologies if this question been asked before. I tried searching the forum but wasn't able to find an exact problem/solution.
    I have uploaded a simplified sample.
    I have identifiers namely, 1 to 10 arranged in column J (J8 to 17) with corresponding values in columns K to N.

    I have the same set of identifiers but now arranged in a row, namely row 25. In K25 for example, I have an identifier "2". I would like a formula that will return the value in column L that corresponds to the identifier 2 for example. Please see shaded area, is there a formula that I can use so that I can just change the position and return the values in columns K to N that matches the identifier in row 25?
    I tried vlookup and I couldn't get it to work.

    Thanks so much for your attention!
    lookuptest.xlsx

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Lookup value in row against value in column

    Hi Opeyemi,

    In cell J26 put this formula:

    =VLOOKUP(J$25,$J$8:$N$17,ROW(A3),0)

    Fill that down to J28, then across to column S. Disregard the A3, as that will change automatically. ROW(A3) = 3, ROW(D5) = 5, etc. It's just used to return the correct column based on how your data is situated.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Lookup value in row against value in column

    J26: =VLOOKUP(J$25,$J$8:$N$17,ROW(A3),FALSE)

    copy across and down

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    01-13-2004
    Posts
    42

    Re: Lookup value in row against value in column

    Thank you Thank you!
    I actually didn't know I could use vlookup as well. This is the first time I have come across the row () embedded into vlookup.

    Much appreciated!

+ 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