+ Reply to Thread
Results 1 to 5 of 5

lookup on 2 rows?

  1. #1
    Registered User
    Join Date
    12-12-2006
    Posts
    63

    lookup on 2 rows?

    Hi,

    I'm trying to lookup a value within a table but have two rows on which I need to search.

    In the attached file I need to, for example, find the Sales for Product B in London, so the value in this example would 4192. The position of Product B within the table can vary although the two cities are always in the same order.

    I'm not sure how to do this, any help much appreciated.

    Thanks
    Liam
    Attached Files Attached Files

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: lookup on 2 rows?

    Hi,

    this can be done with a combination of an Index/Match and a Vlookup, using a helper table for the vlookup.

    see attached.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-12-2006
    Posts
    63

    Re: lookup on 2 rows?

    excellent. many thanks!

  4. #4
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: lookup on 2 rows?

    I think the MATCH in your solution needs the third argument (type) to be set to 0 to work teylyn?
    Please Login or Register  to view this content.

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: lookup on 2 rows?

    Good spotting, estige. Guess the data sample was in my favour

    time for bed.

    The complete formula is

    =INDEX($B$2:$B$10,MATCH($E$1,$A$2:$A$10,0)+VLOOKUP($F$1,$I$1:$J$2,2,FALSE))

+ 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