+ Reply to Thread
Results 1 to 3 of 3

Function to look up value based on two factors

  1. #1
    Registered User
    Join Date
    03-19-2024
    Location
    Los Angeles
    MS-Off Ver
    Microsoft 365 Enterprise
    Posts
    8

    Function to look up value based on two factors

    Hello,

    I am trying to devise a formula where I lookup a value from another worksheet. This is easy enough with vlookup, but there are certain sets of data that require two checks. Meaning the value at the end will be determined by two columns of data, rather than one.

    Please file attached. I feel like I can do this with IFS, but I am also trying to get a formula/function that can be easily pulled down the list everytime i get the list. Like it needs to be a repeatable formula and not a stand alone to get the value this one time.Book2.xlsx

    Thank you

  2. #2
    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,461

    Re: Function to look up value based on two factors

    A few ways (to start)

    =INDEX(Sheet2!$C$2:$C$6,MATCH(B2&C2,Sheet2!$A$2:$A$6&Sheet2!$B$2:$B$6,0))

    =INDEX(Sheet2!$C$2:$C$6,MATCH(1,(B2=Sheet2!$A$2:$A$6)*(C2=Sheet2!$B$2:$B$6),0))

    =FILTER(Sheet2!$C$2:$C$6,(B2=Sheet2!$A$2:$A$6)*(C2=Sheet2!$B$2:$B$6))

    =INDEX(Sheet2!$C$2:$C$6,XMATCH(1,(B2=Sheet2!$A$2:$A$6)*(C2=Sheet2!$B$2:$B$6),0))
    Last edited by TMS; 03-27-2024 at 03:43 PM.
    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


  3. #3
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Function to look up value based on two factors

    With named tables (TCode) you can use this formula.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    And spill array formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by DJunqueira; 03-27-2024 at 03:59 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Lookup based on two factors
    By angelofmine04 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-30-2022, 11:33 AM
  2. [SOLVED] Due date based on a few factors
    By jeremy.wood in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2019, 03:27 PM
  3. Returning a value based on several factors
    By Danwxm in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-16-2014, 06:37 AM
  4. Function that compares factors and their genders
    By caters in forum Excel General
    Replies: 9
    Last Post: 04-10-2014, 10:24 AM
  5. Replies: 6
    Last Post: 07-31-2009, 10:58 AM
  6. Multiple Factors in IF Function
    By bustanutti21 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-26-2008, 07:46 AM
  7. [SOLVED] what is the max number of factors in Linest function
    By apca in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-14-2005, 08:05 AM

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