+ Reply to Thread
Results 1 to 18 of 18

IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

  1. #1
    Registered User
    Join Date
    07-08-2019
    Location
    Hillsboro, Oregon
    MS-Off Ver
    365
    Posts
    28

    IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Hello Everyone,

    A few days ago, I was recently working with a colleague and trying something in Excel to see if I could possibly combine an IFERROR(VLOOKUP()) formula with how I typically use IF(ISNA()). I do not have an exact this that I can upload, but I think I can easily explain it with some generic examples.

    =IFERROR(VLOOKUP(F2,'Phase 2'!$A$2:$A$41,1,FALSE),VLOOKUP(F2,'Phase 3'!$A$2:$A$41,1,FALSE))

    This is to find a value match from 2 different worksheets. However, instead of pulling in the value in those separate worksheets that I am looking up, I want to see if I could replace each of those VLOOKUPs to denote a specific value if it finds a match. When I usually use one VLOOKUP formula and want to accomplish this, I would do something like the below.

    =IF(ISNA(VLOOKUP(F2,'Phase 2'!$A$2:$A$41,1,FALSE),"Phase 2 Not Found","Phase 2 Found")

    My question is simply to see if it is possible to combine both of these approaches. I essentially want to use 2 VLOOKUPs in the first IFERROR(VLOOKUP(),VLOOKUP()) formula but want to include logic to essentially provide a simple return value if it finds a match from either lookup but each would need to return it's own value. So if I were to be trying this with the IFERROR example used above, it could return something like "Phase 2" from the first lookup and "Phase 3" from the second lookup.

    Please let me know if you have any other questions. Again, my apologies for not having an exact example that I can upload here this time.
    Last edited by ckhan84; 07-13-2023 at 09:49 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,933

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Try this:

    =IF(ISNA(VLOOKUP(F2,'Phase 2'!$A$2:$A$41,1,FALSE),"Phase 2 Not Found",IF(ISNA(VLOOKUP(F2,'Phase 3'!$A$2:$A$41,1,FALSE),"Phase 3 Not Found","Both Phases Found"))

    Can't test as you haven't provided a sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    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,464

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    If you just want to know if something is present (and not return a matching value), just use COUNTIF, not VLOOKUP.
    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


  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    You talk a lot about formulas, but you say little about what you ultimately want to achieve and leave me guessing.

    Could you tell us exactly what you want to achieve in the different situations.
    What is the desired result if there is a match in Phase2?
    what is the desired result if there is a match in Phase3?
    what is the desired result if there is no match in Phase2 and no match in Phase3?
    what is the desired result (if that may occur) if there is a match in Phase2 and a match in Phase3? (If this is inpossible, please indicate this explicitly!)
    Last edited by HansDouwe; 07-13-2023 at 10:53 AM.

  5. #5
    Registered User
    Join Date
    07-08-2019
    Location
    Hillsboro, Oregon
    MS-Off Ver
    365
    Posts
    28

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Okay, I created sample data then to try to reflect what I am trying to learn. Please refer to the "Multiple Vlookup Test.xlsx" spreadsheet for reference.

    1. The 'Review' worksheet has column D where I am essentially trying to combine the logic from columns B and C in one formula. I believe I need to just learn how-to nest something like this.
    2. 'Phase 2' and 'Phase 3' worksheets are essentially where I am doing lookups to in order to see if I am finding a result for either of these phases.
    3. Column D on the 'Review' worksheet at the moment is only supporting the multiple lookups via an IFERROR function in front of them.

    My apologies. I thought an explanation would suffice for this as it seemed relatively straightforward in my head. I was incorrect. Please let me know if this helps provide some clarity.
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,933

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Did you try my suggestion? Please respond to it. Thanks.

  7. #7
    Registered User
    Join Date
    07-08-2019
    Location
    Hillsboro, Oregon
    MS-Off Ver
    365
    Posts
    28

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Quote Originally Posted by AliGW View Post
    Try this:

    =IF(ISNA(VLOOKUP(F2,'Phase 2'!$A$2:$A$41,1,FALSE),"Phase 2 Not Found",IF(ISNA(VLOOKUP(F2,'Phase 3'!$A$2:$A$41,1,FALSE),"Phase 3 Not Found","Both Phases Found"))

    Can't test as you haven't provided a sample workbook.
    Thank you for the response. Unfortunately, this did not work as it is never returning "Phase 2 Found" or "Phase 3 Found". I am basically looking to delineate where a record is found in either of the 2 other "phase" worksheets.

  8. #8
    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,464

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

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

  9. #9
    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,464

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Or, if you prefer,
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    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,464

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    With a neater finish (especially if found in Phase 2 and Phase 3)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    If found in Phase 2 and found Phase 3 is not possible, this is sufficiënt:

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

  12. #12
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Or try this:

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    07-08-2019
    Location
    Hillsboro, Oregon
    MS-Off Ver
    365
    Posts
    28

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Major thanks to everyone for the last few posts that did solve my issue. I'm guilty of always thinking in terms of LOOKUPS to accomplish what can be done with nesting IF(ISNA())s, IF(COUNTIF())s, etc. I truly appreciate the education and made some notes for myself to remember doing this in the future.

  14. #14
    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,464

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    You're welcome. Thanks for the rep.

    Note that post #10 is, I think, the only formula that copes with an ID appearing in both Phase 2 AND Phase 3, if that can happen.
    Attached Files Attached Files

  15. #15
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Thanks for the nice feedback and rep .
    Glad to have helped.

    Yes, in Excel there are often different options to achieve the same thing, especially on this forum we learn a lot from each other.

  16. #16
    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,464

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Just for fun, another option with ISNA and MATCH, throwing in NOT and AND.

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

  17. #17
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Also, just for fun.

    Please Login or Register  to view this content.

  18. #18
    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,464

    Re: IFERROR(VLOOKUP()) with an IF(ISNA()) condition?

    Here's an updated file with all the solutions for comparison.
    Attached Files Attached Files

+ 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: 3
    Last Post: 03-31-2016, 06:54 AM
  2. [SOLVED] how to add isna, iferror
    By xboxpacman in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-07-2015, 08:55 PM
  3. [SOLVED] Add iferror or isna or similar
    By xboxpacman in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 05-07-2015, 04:16 PM
  4. If Isna vlookup help
    By michaelpair in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-26-2013, 03:43 PM
  5. Isna(vlookup
    By Strugggler in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-16-2009, 09:16 PM
  6. Isna Vlookup
    By markswan20 in forum Excel General
    Replies: 1
    Last Post: 01-30-2008, 12:25 PM
  7. [SOLVED] ISNA and VLOOKUP
    By Chris Kellock in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-12-2005, 04:06 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