+ Reply to Thread
Results 1 to 4 of 4

V Lookup for data based on 2 conditions at once

  1. #1
    Registered User
    Join Date
    02-06-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    V Lookup for data based on 2 conditions at once

    Hi there,

    I'm trying to create a Vlookup to display data in a grid by finding the value in tab 2 based on both the P/N and location at once and displaying it in the value column on tab 1. So that would be if row in tab 2 contains both specified PN AND Location, display value in tab 1. Possible? See below for what I mean.

    Vlookupdiagram.jpg
    Last edited by Thedaivisch; 02-06-2013 at 03:08 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: V Lookup for data based on 2 conditions at once

    You'll need to use INDEX/MATCH

    =INDEX(Data table you want to return from not including headers, Match to find row of table, Match to find Column of Data)

    If your data is in Sheet2!B2:D4

    In Sheet1 C2
    =INDEX(Sheet2!$B$2:$D$4, MATCH(A2, Sheet2!$A$2:$A$4,0), MATCH(B2, Sheet2!$B$1:$D$1,0))
    copied down
    Is that what you are looking for?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    02-06-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: V Lookup for data based on 2 conditions at once

    That command will match across set rows and columns, and therefore assumes the rows are the same data in the same order, right? (my diagram was crappy and a little misleading in that sense). Unfortunately, my data is a complete list of all the items in alphabetical order in sheet 2, and a random subset of the items, in a random order in sheet 1. Therefore the formula needs find item type and location in sheet one and then find a row with a match on both item type and location on sheet 2.

  4. #4
    Registered User
    Join Date
    02-06-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: V Lookup for data based on 2 conditions at once

    hmmmm...actually maybe that is right then...your formula doesn't seem to be working, so I can't tell. Is there a mistake in your example?
    Last edited by Thedaivisch; 02-07-2013 at 07:29 AM.

+ 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