+ Reply to Thread
Results 1 to 6 of 6

Combining IF and VLOOKUP formula

  1. #1
    Registered User
    Join Date
    08-28-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    2

    Combining IF and VLOOKUP formula

    Need to lookup and return data from a table when 2 lookup criteria are met. Struggling to get formula to work through 2 vlookup questions and return a value if they are both met.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Combining IF and VLOOKUP formula

    If the values to be returned are numeric, you can use SUMIFS

    e.g

    =SUMIFS(C1:C10,A1:A10,X1,B1:B10,Y1)

    where X1 and Y1 contain the values to look up in columns A and B, respectively, and column C contains the number to return.

    otherwise

    =INDEX(C1:C10,MATCH(1,INDEX((A1:A10=X1)*(B1:B10=Y1),0),0))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    08-11-2012
    Location
    bengalur
    MS-Off Ver
    Excel 2003, 2007
    Posts
    152

    Re: Combining IF and VLOOKUP formula

    =if(AND(Vlookup() = Value1,Vlookup() = Value2), True, False)

    If two values are to be met then using AND function we meet two conditions and then based on it we can give the results

    ___________________________________________________________________________________________________________________
    Please click * to say thank you

  4. #4
    Registered User
    Join Date
    08-28-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Combining IF and VLOOKUP formula

    Thank you for replies.

    The formula needs to find the data line within one table that has 2 exact data (alpha) matches on a line within another table and return an alpha data entry from a column within one of the tables.

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

    Re: Combining IF and VLOOKUP formula

    Another option.
    If your lookup is in sheet2!A2:K100, and you are working on sheet1 with your two conditions in A2 and B2 for example:

    Insert a column A in Sheet2, (you can later hide this)
    In sheet2 A2 =B2&C2 copied down

    Then in sheet1
    =VLOOKUP(A2&B2, Sheet2!$A$2:$L$100, 4, FALSE)
    returning the 4th column which used to be the 3rd column
    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

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Combining IF and VLOOKUP formula

    Quote Originally Posted by Golightlybug View Post
    Thank you for replies.

    The formula needs to find the data line within one table that has 2 exact data (alpha) matches on a line within another table and return an alpha data entry from a column within one of the tables.
    Probably my second option where X1 and Y1 are the items in the other table to lookup in first table, A1:C10...

    Did you give it a try?

+ 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. Combining vlookup sum formula
    By JodyKlesko in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-05-2013, 12:00 PM
  2. combining if and vlookup in single formula
    By pjkcpa in forum Excel General
    Replies: 8
    Last Post: 02-25-2012, 02:53 AM
  3. Combining VLOOKUP and IF formula to return a $ value
    By JadeLu in forum Excel General
    Replies: 1
    Last Post: 12-10-2011, 01:44 AM
  4. Excel 2007 : Combining IF and VLOOKUP in a formula
    By Lezahp in forum Excel General
    Replies: 4
    Last Post: 09-07-2011, 11:51 AM
  5. [SOLVED] combining a Vlookup and Mid formula
    By [email protected] in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-13-2005, 01:35 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