+ Reply to Thread
Results 1 to 8 of 8

Is there an IF STATEMENT to do a VLOOKUP with results based on various criteria

  1. #1
    Registered User
    Join Date
    02-24-2018
    Location
    Palmerton, PA
    MS-Off Ver
    2016
    Posts
    39

    Is there an IF STATEMENT to do a VLOOKUP with results based on various criteria

    Hello,

    I am trying to do a VLOOKUP in a different book. The basic VLOOKUP is simple. My problem is the results. Here is my issue.

    Ok I have a report I'm building so we will call that Report. I am looking for information in Source.

    I start in Report with a VLOOKUP but I need to return results from 1 of 3 columns. In other words I'm matching B2 with column 1 but I need to check each following column for results. Return column 3 if Column 3 is blank return column 5 and if column 5 is blank return column 7.

    How can this be done?

  2. #2
    Registered User
    Join Date
    11-20-2015
    Location
    Rogers
    MS-Off Ver
    365
    Posts
    23

    Re: Is there an IF STATEMENT to do a VLOOKUP with results based on various criteria

    Can you please attach a sample workbook?

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Is there an IF STATEMENT to do a VLOOKUP with results based on various criteria

    if what you are saying is that you have a vlookup that looks one column and finds some items but not others then it would return #N/A as the result so it should look into a different column, etc. then something like =IFERROR(VLOOKUP(A4,Sheet2!$A$2:$C$20,3,FALSE),IFERROR(VLOOKUP(A4,Sheet2!$C$2:$e$20,3,FALSE),VLOOKUP(A4,Sheet2!$D$2:$F$20,3,FALSE)))
    adjusted to your needs should work.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Registered User
    Join Date
    02-24-2018
    Location
    Palmerton, PA
    MS-Off Ver
    2016
    Posts
    39

    Re: Is there an IF STATEMENT to do a VLOOKUP with results based on various criteria

    Yes,

    Please see attached files. As you will see in the source, there are three different contacts options. However, there are not always someone slotted in each position. I need to pull the most senior contact.
    Attached Files Attached Files

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Is there an IF STATEMENT to do a VLOOKUP with results based on various criteria

    deleted, that won't do it based on your corrected info.
    will have a different one in a couple minutes.
    Last edited by Sam Capricci; 03-30-2018 at 02:59 PM.

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Is there an IF STATEMENT to do a VLOOKUP with results based on various criteria

    here you go...
    =IF(AND(VLOOKUP(B2,'[source.xlsx]Sheet1'!$A$2:$C$7,3,FALSE)=0,VLOOKUP(B2,'[source.xlsx]Sheet1'!$A$2:$E$7,5,FALSE)=0),VLOOKUP(B2,'[source.xlsx]Sheet1'!$A$2:$G$7,7,FALSE),IF(VLOOKUP(B2,'[source.xlsx]Sheet1'!$A$2:$C$7,3,FALSE)=0,VLOOKUP(B2,'[source.xlsx]Sheet1'!$A$2:$E$7,5,FALSE),VLOOKUP(B2,'[source.xlsx]Sheet1'!$A$2:$C$7,3,FALSE)))
    it appears to work with your examples.

  7. #7
    Registered User
    Join Date
    02-24-2018
    Location
    Palmerton, PA
    MS-Off Ver
    2016
    Posts
    39

    Re: Is there an IF STATEMENT to do a VLOOKUP with results based on various criteria

    Thanks so very much!!! That's exactly what I needed.

  8. #8
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Is there an IF STATEMENT to do a VLOOKUP with results based on various criteria

    you're welcome, and thank you for the rep!

+ 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. Replies: 1
    Last Post: 02-15-2017, 04:59 PM
  2. [SOLVED] Vlookup- multiple results for same criteria. how to solve issue??
    By imadhasan in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-23-2016, 06:42 AM
  3. Using vLookup based on results from a vLookup & returning an undetermined list
    By NormalityBan in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-14-2014, 05:02 AM
  4. Vlookup with 2 Criteria using formula results and text
    By gjwilson1216 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-28-2014, 03:44 AM
  5. Count statement wtih multiple criteria only showing results for one criteria
    By uhlabomber in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-17-2013, 02:47 PM
  6. Creating a list based on the results of an IF Statement
    By tcrjmom in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-06-2013, 07:16 PM
  7. Vlookup using cell with results of if statement
    By gisawear in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-14-2012, 05:53 AM

Tags for this Thread

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