+ Reply to Thread
Results 1 to 7 of 7

vlookup formula with two criteria that must be met to return a value

  1. #1
    Registered User
    Join Date
    10-12-2012
    Location
    united states
    MS-Off Ver
    Excel 2010
    Posts
    4

    vlookup formula with two criteria that must be met to return a value

    This is my formula: IF(ISERROR(VLOOKUP(A7,[FTEBYWORKEDDEPT.xlsm]FTE!$E$1:$K$3500,6,FALSE)),"",VLOOKUP(A7,[FTEBYWORKEDDEPT.xlsm]FTE!$E$1:$K$3500,6,FALSE))

    I want to make this formula search two fields (A7 & C31). Example: A7 = "SMITH, JOHN" which searches the spreadsheet "FTEBYWORKEDEPT.xlsm". C31 = "001".

    I basically want my formula to search for two criteria (A7 & C31) before it returns a value. Both criteria must be met before a value is returned.

    I need some help....hope I didn't confuse anyone too much!

    Confused!

  2. #2
    Registered User
    Join Date
    10-12-2012
    Location
    united states
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: vlookup formula with two criteria that must be met to return a value

    Can this even be done?

  3. #3
    Registered User
    Join Date
    10-12-2012
    Location
    united states
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: vlookup formula with two criteria that must be met to return a value

    In theory (in my mind) the formula should look like this:

    IF(ISERROR(VLOOKUP(A7&C31,[FTEBYWORKEDDEPT.xlsm]FTE!$E$1:$K$3500,6,FALSE)),"",VLOOKUP(A7&C31,[FTEBYWORKEDDEPT.xlsm]FTE!$E$1:$K$3500,6,FALSE))

    This of course doesn't work though....this is driving my NUTS!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: vlookup formula with two criteria that must be met to return a value

    have you tried to combine the 2 values in your lookup range, and then doing the vlookup(A7&C31

    upload a sample workbook and i will walk you thru it
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Contributor
    Join Date
    08-08-2005
    Location
    Kansas, USA
    MS-Off Ver
    2016
    Posts
    293

    Re: vlookup formula with two criteria that must be met to return a value

    Can't you just use AND statements?

    IF(AND(ISERROR(VLOOKUP(A7,[FTEBYWORKEDDEPT.xlsm]FTE!$E$1:$K$3500,6,FALSE)),ISERROR(VLOOKUP(B7,[FTEBYWORKEDDEPT.xlsm]FTE!$E$1:$K$3500,6,FALSE)),"",VLOOKUP(A7,[FTEBYWORKEDDEPT.xlsm]FTE!$E$1:$K$3500,6,FALSE))

    ---GJCase

  6. #6
    Registered User
    Join Date
    10-12-2012
    Location
    united states
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: vlookup formula with two criteria that must be met to return a value

    Where in the formula would I enter in C31?

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: vlookup formula with two criteria that must be met to return a value

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

+ 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