+ Reply to Thread
Results 1 to 4 of 4

finding a text string and returning a Y or N

  1. #1
    Registered User
    Join Date
    05-11-2011
    Location
    steeple bumpstead, england
    MS-Off Ver
    Excel 2007
    Posts
    13

    finding a text string and returning a Y or N

    Hi, I am having a little difficulty in writing a formula to find a text (and number)in a cell and returning a Y or N.

    I have in column A for instance either B19 or HAAC or BRSC what I am trying to do is interogate column A to see if any of the cells contain B19 and if so return a Y if not then return a N.

    I can get a formula to give a Y but it gives a #VALUE if it does not contain B19.

    The formula I am using is =IF(FIND("B19",D5),"Y"," ") D5 is the column and row.

    Where am I going wrong!

    Regards

    Martyn

    PS B19 is not a cell reference but is the text/number in the cell (it is the name of my motor club)

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: finding a text string and returning a Y or N

    Hi and welcome to the board

    Try
    Please Login or Register  to view this content.
    Be aware the FIND is case sensitive, if necessary use the SEARCH function instead

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,069

    Re: finding a text string and returning a Y or N

    FIND will return you "N/A if ti doesn't find it.

    therefore you need to do next:

    check ISNA() result of your formula

    =IF(ISNA(FIND("B19",D5)), "N","Y")
    Never use Merged Cells in Excel

  4. #4
    Registered User
    Join Date
    05-11-2011
    Location
    steeple bumpstead, england
    MS-Off Ver
    Excel 2007
    Posts
    13

    Smile Re: finding a text string and returning a Y or N

    Thanks for the welcome and thanks for the answer, sometimes you just can't see the wood for the trees.

    Regards

    martyn

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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