+ Reply to Thread
Results 1 to 15 of 15

Use of formula =IF(ISNUMBER(SEARCH...

  1. #1
    Registered User
    Join Date
    11-08-2016
    Location
    Netherlands
    MS-Off Ver
    Excel for Mac 15.32, English version
    Posts
    26

    Use of formula =IF(ISNUMBER(SEARCH...

    Hi, can anybody clarify what's wrong with this formula:
    =IF(ISNUMBER(SEARCH(A1;D:D));E1;"no hit")

    The idea is: test if the value of cell A1 is present in column D.
    If so, fill the cell with the content of cell E1
    Otherwise with "no hit".

    The formula produces 'No hit', so I guess the IF test results in FALSE.

    Thanks for your help!

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    Try something like this:

    =IF(COUNTIF(D:D,"*"&A1&"*"),E1,"no hit")

    Edit: Switch the commas with semi-colons if that's what your regional settings require.
    Last edited by 63falcondude; 08-30-2018 at 09:02 AM.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    That formula returns an array of results, not a single result. Try:

    =IF(COUNTIF(D:D;"*"&A1&"*")>0;E1;"no hit")
    Remember what the dormouse said
    Feed your head

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    Hi there,

    SEARCH() is for finding a substring of text in a cell; you need to use MATCH() I think:

    =IF(ISNUMBER(MATCH(A1;D:D;0));E1;"no hit")

    NOTE: This only works if you're matching the whole value. If it might be a partial match, use the formula above.

    WBD

  5. #5
    Registered User
    Join Date
    11-08-2016
    Location
    Netherlands
    MS-Off Ver
    Excel for Mac 15.32, English version
    Posts
    26

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    Hi, Thanks for your suggestions. Momentarily I'm away from my computer. Will get back to you soon.

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    FWIW for a partial match with MATCH, use:

    MATCH("*"&A1&"*";D:D;0)

  7. #7
    Registered User
    Join Date
    11-08-2016
    Location
    Netherlands
    MS-Off Ver
    Excel for Mac 15.32, English version
    Posts
    26

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    The formula =IF(COUNTIF(D:D,"*"&A1&"*"),E1,"no hit") does the job. Also thanks for the suggestions made by the other repliers.

    However, on second thought I realize that I need to take the solution one step further – maybe even an approach different from '=IF(ISNUMBER(SEARCH...' will be is necessary.

    What the formula needs to do is fill not only cell E1 but all cells of column E:E. Any suggestions?

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    Should they all be based on A1 as a criterion, or should they adjust for the same row in column E?

    If they should all use A1 then:

    =IF(COUNTIF(D:D,"*"&$A$1&"*"),E1,"no hit")

    and copy down. If they should adjust then use the original version and copy that down.

  9. #9
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    Glad we could help.

    If I am understanding you correctly, simply drag the formula down.

    If I am not, consider uploading a small representative sample workbook along with the desired results (which you can enter manually) based on that sample.

    To upload an Excel workbook, follow these steps:
    1) Click on "Go Advanced"
    2) Click on "Manage Attachments"
    3) Click on "Choose File"
    4) Choose your file and click on "Open"
    5) Click on "Upload"
    6) Click on "Close this window"

  10. #10
    Registered User
    Join Date
    11-08-2016
    Location
    Netherlands
    MS-Off Ver
    Excel for Mac 15.32, English version
    Posts
    26

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    See attached sample file. The yellow values in the consecutive cells in column B:B (yellow) are an exact copy of those in column B:B (orange), which is of course not the intended result.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    08-29-2018
    Location
    Goa India
    MS-Off Ver
    2013
    Posts
    5

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    If you want referencing then simply use this formula and drag down
    =IFERROR(VLOOKUP(A1,D:E,2,0),"No hit")

  12. #12
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    Then I think you can try:

    Please Login or Register  to view this content.
    In cell B1

    WBD

  13. #13
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    I'm guessing you actually want a VLOOKUP:

    =IFERROR(VLOOKUP(A1,D:E,2,FALSE),"no hit")

  14. #14
    Registered User
    Join Date
    11-08-2016
    Location
    Netherlands
    MS-Off Ver
    Excel for Mac 15.32, English version
    Posts
    26

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    Here is my feedback on the suggested solutions.

    The following formulas perform the task I posted orginally. However, I can't find a way to exoend them in order to go 'one step further', as I expressed it.
    =IF(COUNTIF(D:D;"*"&A1&"*");E1;"no hit")
    =IF(ISNUMBER(MATCH(A1;D:D;0));E1;"no hit")
    =IF(ISNUMBER(MATCH("*"&A1&"*";D:D;0));E1;"no hit")

    The ones below did not.
    =IF(COUNTIF(D:D;"*"&A1&"*")>0;E1;"no hit") - result: 'no hit' while actualy there was a hit
    =IF(ISNUMBER(MATCH(A1;D:D;0));E1;"no hit") - result '0'

    Thank all of you for thinking along.

  15. #15
    Registered User
    Join Date
    11-08-2016
    Location
    Netherlands
    MS-Off Ver
    Excel for Mac 15.32, English version
    Posts
    26

    Re: Use of formula =IF(ISNUMBER(SEARCH...

    Feedback on suggested 'one step further' solutions.

    The formulas below do exactly what I need. They also expand correctly when I use the fill handle.
    =IFERROR(VLOOKUP(A1;D:E;2;0);"No hit")
    =IFERROR(INDEX($E:$E;MATCH($A1;$D:$D;0));"no hit")
    =IFERROR(VLOOKUP(A1;D:E;2;FALSE);"no hit")

    Thanks to all for your help.

+ 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] My =IF(ISNUMBER(SEARCH Formula is Not Working
    By thanhie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-03-2022, 12:30 AM
  2. Need help modifying IF(ISNUMBER(SEARCH... formula)
    By newbieexceldude in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-10-2016, 06:02 AM
  3. Formula Help Needed: IF plus ISNUMBER plus SEARCH plus OR plus AND
    By TOLJ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-21-2016, 01:30 AM
  4. [SOLVED] Help with a isnumber, iferror, search formula
    By shiftyspina in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2015, 08:31 AM
  5. Need help with isnumber(search) Formula
    By lpretor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-15-2013, 08:14 PM
  6. [SOLVED] Modification of a IF ISNUMBER SEARCH formula
    By zigojacko in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-16-2013, 04:20 AM
  7. using IF(ISNUMBER(SEARCH formula
    By dkmanley in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-19-2011, 01:43 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