+ Reply to Thread
Results 1 to 6 of 6

How to lookup values same row values different column values

  1. #1
    Registered User
    Join Date
    06-23-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    How to lookup values same row values different column values

    I got multiple rows with common values but have different values on their respective columns. I would like to specify to what row only. I got this form with 8 rows to vlookup values every time i change the lookup values. I want the first row to specify only for the first row of the value and so on.

    Sample

    Square Yellow Large 12.50
    Square Red Small 9.50
    Square Green Xlarge 15.00
    Circle Yellow Large 10.50
    Circle Red Small 7.50

    Tried using vlookup but it returns values from the last row of the lookup values. In this example, if "square", it returns the amount of 15.00, i would like it to show 12.50 for the first row of "square".

    English not my native language, hope i was clear.

    Thanks in advance.
    Last edited by kgonzalbo; 05-24-2011 at 04:55 AM.

  2. #2
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: How to lookup values same row values different column values

    instead of this
    =VLOOKUP("Square",LookupRange,4)

    try =VLOOKUP("Square",LookupRange,4,0)

  3. #3
    Registered User
    Join Date
    06-23-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How to lookup values same row values different column values

    Quote Originally Posted by Sadath31 View Post
    instead of this
    =VLOOKUP("Square",LookupRange,4)

    try =VLOOKUP("Square",LookupRange,4,0)

    It solves my other problem but how do i make it move for the next row? I've attached a sample. Thanks.
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to lookup values same row values different column values

    This will work because your 8 matching rows are all together in your data. This formula will actually keep finding the first J2 value over and over, but it will then offset 1 row for each row you copy the formula down.

    Put this formula in J3, then copy down and across your table:

    =INDEX(D:D, MATCH($J$2,$A:$A, 0) + ROW($A1) - 1, 0)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    06-23-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How to lookup values same row values different column values

    Quote Originally Posted by JBeaucaire View Post
    This will work because your 8 matching rows are all together in your data. This formula will actually keep finding the first J2 value over and over, but it will then offset 1 row for each row you copy the formula down.

    Put this formula in J3, then copy down and across your table:

    =INDEX(D:D, MATCH($J$2,$A:$A, 0) + ROW($A1) - 1, 0)

    Thanks! Now they are all working. It took me weeks searching for the answer. Finally I gave up and asked the question here. Thanks again

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to lookup values same row values different column values

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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