+ Reply to Thread
Results 1 to 7 of 7

IF Error Index Match formula to give Not found instead of N/A error

  1. #1
    Registered User
    Join Date
    02-21-2018
    Location
    UK
    MS-Off Ver
    2010
    Posts
    7

    IF Error Index Match formula to give Not found instead of N/A error

    Hi I have a cell that can sometimes be blank but usually has IDs. In some cases the IDs include a prefix of 3 letters that tells me what team that ID belongs to.

    Look up values (in a separate sheet called specialties prefix)
    A B
    Car Cardiology
    Der Dermatology

    Data
    ID Team (DI
    CAR-001 Cardiology

    TFT0101 Not Found
    Der0014 Dermatology


    IF(F2="","",IFERROR(INDEX('[Specialty Prefixes .xlsm]Prefix'!$B$2:$B$54,MATCH(LEFT(A2,3),'[Specialty Prefixes .xlsm]Prefix'!$A$2:$A$54,0),"not found"),INDEX('[Specialty Prefixes .xlsm]Prefix'!$B$2:$B$54,MATCH(LEFT(F2,3),'[Specialty Prefixes .xlsm]Prefix'!$A$2:$A$54,0),1)))

    This formula works great to identify the prefix (if there is data in there) and provide me with the right team but when it does not find a prefix, it gives you N/A. I would like it to not show up as an error but to say "Not found" instead. I know how to do this with a simple formula but this has so many sections that no matter where i try to add the "not found", the formula does not work for me. Can anyone help?

    Many thanks in advance.
    Apologies if i have not followed the appropriate process. This is probably my 2nd post here!

  2. #2
    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
    48,082

    Re: IF Error Index Match formula to give Not found instead of N/A error

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    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


  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,911

    Re: IF Error Index Match formula to give Not found instead of N/A error

    You reference "Speciality Prefixes .xlsm" in your formula. Is your lookup table by any chance in another workbook? And one that's closed at the time you're expecting a result from it?

    Some formulas won't work on closed workbooks and could be why you're getting an N/A err.

    But as TMS says, a sample workbook would be of great help in providing a solution.

    BSB

  4. #4
    Registered User
    Join Date
    02-21-2018
    Location
    UK
    MS-Off Ver
    2010
    Posts
    7

    Re: IF Error Index Match formula to give Not found instead of N/A error

    Hi

    I'm trying to attach the look up spreadsheet as well as a small sample of my spreadsheet with the formula with explanations as to what i am struggling with and why. I've modified the formula to not give me black if the cell has no data as i would like the result if the Index/max formula does not find the prefix i am interested in, it says "not found".
    I am not sure it is attaching properly though. let me know if you cannot see them.
    Just to clarify the 2 files are currently open and the formula gives me either the right match or N/A. I just want N/A to say "not found" so another formula I have works. This however needs to work even if the other look up spreadsheet with the prefixes is closed. I guess i could consider adding the prefix list to a 2nd sheet on my spreadsheet potentially if necessary.

    Thank you
    Attached Files Attached Files

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,911

    Re: IF Error Index Match formula to give Not found instead of N/A error

    Does this do what you need?
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BSB

  6. #6
    Registered User
    Join Date
    02-21-2018
    Location
    UK
    MS-Off Ver
    2010
    Posts
    7

    Re: IF Error Index Match formula to give Not found instead of N/A error

    Thank you, that worked perfectly!

  7. #7
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,911

    Re: IF Error Index Match formula to give Not found instead of N/A error

    Glad I could help

    BSB

+ 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: 6
    Last Post: 05-24-2022, 04:05 AM
  2. Im getting a #N/A error on this index/match formula
    By survah in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-13-2021, 07:59 AM
  3. Error in my INDEX MATCH Formula?
    By gimlay in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-01-2019, 02:05 PM
  4. #N/A Error with INDEX MATCH formula
    By manoj_b118 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-22-2015, 07:58 AM
  5. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  6. [SOLVED] #REF! Error in INDEX & MATCH Formula!
    By Rajeshkumar R in forum Excel General
    Replies: 6
    Last Post: 06-09-2012, 09:00 AM
  7. Replies: 3
    Last Post: 04-25-2007, 08:27 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