+ Reply to Thread
Results 1 to 4 of 4

Vlookup using multiple conditions

  1. #1
    Registered User
    Join Date
    06-22-2010
    Location
    Rocky Mountain House, Alberta, Canada
    MS-Off Ver
    Excel 2016
    Posts
    23

    Vlookup using multiple conditions

    I have a VLOOKUP formula that returns the rate for a piece of equipment based on the unit# entered. Both my lookup vector and result vector are on sheet 2. My formula works great so far but I want to add a second criteria and can't figure out how.

    Sheet 1 is set up as follows:
    Column 1 Column 2 Column 3
    Unit# Unit of Measure Rate
    676 Hour 15


    Sheet 2 is set up as follows:
    Column 1 Column 2 Column 3
    Unit# Unit of Measure Rate
    676 Hour 15
    676 Day 100

    My formula in Sheet 1 cell C2 reads:

    =LOOKUP(A2,'Sheet2'!$A$2:$A$100,'Sheet2'!$C$2:$C$100)

    How do I add a second condition to my formula that will change my rate to $100 if Day is selected on Sheet 1 instead of Hour?
    Last edited by Charlene Hainsworth; 10-13-2011 at 06:28 PM.

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

    Re: Vlookup using multiple conditions

    This is an Array formula. When you enter it, use CNTRL SHFT ENTER instead of ENTER. You'll see brackets appear around the formula. Then copy down

    =INDEX(Sheet2!$C$2:$C$100,MATCH(A2&B2,Sheet2!$A$2:$A$100&Sheet2!$B$2:$B$100,0))
    Does that work for you?
    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
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Vlookup using multiple conditions

    Alternative:
    =SUMPRODUCT(--(Sheet2!$A$2:$A$100=A2),--(Sheet2!$B$2:$B$100=B2),Sheet2!$C$2:$C$100)
    Hope that helps,
    ~tigeravatar

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

  4. #4
    Registered User
    Join Date
    06-22-2010
    Location
    Rocky Mountain House, Alberta, Canada
    MS-Off Ver
    Excel 2016
    Posts
    23

    Re: Vlookup using multiple conditions

    This worked superb! Thanks soooo much!

+ 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