+ Reply to Thread
Results 1 to 9 of 9

SEARCH and FIND function - VALUE ERROR !

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-09-2014
    Location
    Kamnik, Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    693

    SEARCH and FIND function - VALUE ERROR !

    Hi,

    I have a #VALUE error in FIND or SEARCH function.

    What I want is to display "0" in a formula cell, If cell D6 cointains text <empty>. If It doesn't contain this text, I want cell to display value from C9.

    I know FIND and SEARCH function return #VALUE error If text is not TRUE, but can I overcome this ? Or maybe solve my problem with other function ??

    These are formulas I tried so far (none working):

    =IF(FIND("<empty>";D6);0;C9)
    =IF(FIND("<empty>";D6);0;IF(ISNUMBER(SEARCH("-";C9));C9;0))
    =IF(ISNUMBER(SEARCH("-";C9));IF(FIND("<empty>";D6);0);C9)

    See attached sample !

    Thanks for help !
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SEARCH and FIND function - VALUE ERROR !

    Try

    =IF(ISERROR(SEARCH("<empty>";D6));C9;0)

  3. #3
    Valued Forum Contributor TheCman81's Avatar
    Join Date
    11-06-2012
    Location
    Edinburgh, UK
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    346

    Re: SEARCH and FIND function - VALUE ERROR !

    Hi, unless I'm missing something it should just be

    =IF(D6="<empty>",0,C9)
    Excel Guru in the making

    <----------If the question has been answered to your satisfication please click the Add Repuation star to the left

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SEARCH and FIND function - VALUE ERROR !

    Quote Originally Posted by TheCman81 View Post
    unless I'm missing something
    I think the string in D6 contains more than just <empty>, like
    "there is more text besides <empty> in the cell"

  5. #5
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,885

    Re: SEARCH and FIND function - VALUE ERROR !

    Try this:
    Formula: copy to clipboard
    =IF(ISERR(FIND("<empty>",D6)),0,C9)


    Edit: it should be SEARCH instead of FIND.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: SEARCH and FIND function - VALUE ERROR !

    =IF(C6="<empty>",0,C9)
    or if there is text like
    "this is <empty> xxxxx"
    =IF(ISNUMBER(SEARCH("<empty>",C6)),0,C9)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SEARCH and FIND function - VALUE ERROR !

    Here's another method..

    =IF(COUNTIF(D6;"*<empty>*");0;C9)

  8. #8
    Forum Contributor
    Join Date
    02-09-2014
    Location
    Kamnik, Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    693

    Re: SEARCH and FIND function - VALUE ERROR !

    Thanks for all responses,

    All formulas you provided works except Jacc's one where only True and False needs to be reversed) !!

    thanks for help, I will use first one :

    =IF(ISERROR(SEARCH("<empty>";D6));C9;0)

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SEARCH and FIND function - VALUE ERROR !

    You're welcome.

+ 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. Find and Search Function
    By specialk9203 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-16-2014, 04:36 PM
  2. [SOLVED] Error in function Compile error: Can't find project or library
    By Motario1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-12-2013, 02:20 AM
  3. Find or search error
    By capngene in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2012, 12:38 AM
  4. Search VBA causing error when data isn't there to find
    By BouncingHippo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2008, 10:57 PM
  5. Find & Search Function
    By drvortex in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-16-2006, 03:34 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