+ Reply to Thread
Results 1 to 8 of 8

If not found....

  1. #1
    Registered User
    Join Date
    10-04-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 2007
    Posts
    53

    If not found....

    Hey guys,

    I have a spreadsheet I am working on where there are multiple input tabs and a master tab that pulls all the details into one. I created this formula to basically search through all the tabs and pull the number from the associated tab based on a unique ID number:

    =IFERROR(INDEX(Tab1!L:L,MATCH(G2,Tab1!E:E,0)), IFERROR(INDEX('Tab2'!L:L,MATCH(G2,'Tab2'!E:E,0)), IFERROR(INDEX(Tab3!L:L,MATCH(G2,Tab3!E:E,0)), INDEX(Tab4!L:L,MATCH(G2,Tab4!E:E,0)))))

    The problem I am having is figuring out how to make it not give a "#N/A" if the UID is not found. I would love for it to just give a "-" if there is nothing found that matches. Any thoughts?

    Thanks,
    Nathan

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: If not found....

    maybe use total IFERROR(your_whole_formula,"-")

  3. #3
    Registered User
    Join Date
    10-04-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 2007
    Posts
    53

    Re: If not found....

    I knew it had to be something simple. Thank you!

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: If not found....

    You are welcome

  5. #5
    Registered User
    Join Date
    10-04-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 2007
    Posts
    53

    Re: If not found....

    I am going to open this one back up because I have a followup issue with it now. The formula is working perfectly except for one minor detail. Now, when it searches the tabs and DOES find a unique ID, but the called cell is blank it is putting a "0" in the cell. How do I make it if it detects the cell as blank to put a "-" in the cell as well?

    Here is my formula as it stands now:

    =IFERROR(IFERROR(INDEX(Tab1!H:H,MATCH($G2,Tab1!$G:$G,0)), IFERROR(INDEX('Tab2'!H:H,MATCH($G2,'Tab2'!$G:$G,0)), IFERROR(INDEX(Tab3!H:H,MATCH($G2,Tab3!$G:$G,0)), INDEX(Tab4!H:H,MATCH($G2,Tab4!$G:$G,0))))),"-")

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: If not found....

    you can try untick this option to "show" blank instead of zero. (I don't remember where it is in Ex2007)

    showzero.jpg

    If you really want "-" your formula will be a monster

    =IF(OR(ISERROR(IFERROR(INDEX(Tab1!H:H,MATCH($G2,Tab1!$G:$G,0)), IFERROR(INDEX('Tab2'!H:H,MATCH($G2,'Tab2'!$G:$G,0)), IFERROR(INDEX(Tab3!H:H,MATCH($G2,Tab3!$G:$G,0)), INDEX(Tab4!H:H,MATCH($G2,Tab4!$G:$G,0)))))),IFERROR(INDEX(Tab1!H:H,MATCH($G2,Tab1!$G:$G,0)), IFERROR(INDEX('Tab2'!H:H,MATCH($G2,'Tab2'!$G:$G,0)), IFERROR(INDEX(Tab3!H:H,MATCH($G2,Tab3!$G:$G,0)), INDEX(Tab4!H:H,MATCH($G2,Tab4!$G:$G,0)))))=0),"-",IFERROR(INDEX(Tab1!H:H,MATCH($G2,Tab1!$G:$G,0)), IFERROR(INDEX('Tab2'!H:H,MATCH($G2,'Tab2'!$G:$G,0)), IFERROR(INDEX(Tab3!H:H,MATCH($G2,Tab3!$G:$G,0)), INDEX(Tab4!H:H,MATCH($G2,Tab4!$G:$G,0))))))

    not tested. you need to check it

    edit:
    =IF(OR(ISERROR(your_formula),your_formula=0),"-",your_formula)
    where your_formula is:
    IFERROR(INDEX(Tab1!L:L,MATCH(G2,Tab1!E:E,0)), IFERROR(INDEX('Tab2'!L:L,MATCH(G2,'Tab2'!E:E,0)), IFERROR(INDEX(Tab3!L:L,MATCH(G2,Tab3!E:E,0)), INDEX(Tab4!L:L,MATCH(G2,Tab4!E:E,0)))))
    Last edited by sandy666; 11-06-2017 at 07:36 PM.

  7. #7
    Registered User
    Join Date
    10-04-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 2007
    Posts
    53

    Re: If not found....

    I liked the idea of having something in the cell so it shows that it returned nothing but I'd rather not make the formula that crazy so I will use the checkbox option Nothing looks better than a 0. And I think as long as the sheet is protected so no one tries to type in the field it should be good! Thanks!!

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: If not found....

    You are welcome

    this is your opinion about blank than zero I prefer zeroes

    If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)
    If you did it - ignore it.
    Thank you.

+ 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. [SOLVED] How to identify values that are found in variable_1 but are not found in variable_2?
    By Mirisage in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 01-26-2017, 10:55 AM
  2. Searching column 1 with data from 2 and reporting found or not found
    By San75 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-15-2016, 05:23 PM
  3. Format if not found in addition to found
    By cwhite86 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-16-2016, 07:57 PM
  4. Search for value in a range and overwrite if found and create new if not found
    By mm671750 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-04-2016, 01:19 PM
  5. IF Webpagecontent FOUND then X IF Webpage content NOT FOUND THEN Y
    By excelcandy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-01-2013, 02:57 PM
  6. Check for values in a table and if found add value found in column to left to list
    By robhargreaves in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-07-2013, 02:57 PM
  7. [SOLVED] Message (in one window) for each file found/not found
    By kboy1289 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-08-2013, 04:03 PM

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