+ Reply to Thread
Results 1 to 7 of 7

Using 'If' refer to specific words in a cell containing text

  1. #1
    Casino Guy
    Guest

    Re: Using 'If' refer to specific words in a cell containing text

    The function you wrote works when the condition is true but when the
    condition is false it returns #VALUE! instead of Not Found


    "swatsp0p" wrote:

    >
    > Is this what you are looking for?:
    >
    > A1="Friday Food Sales"
    >
    > B1=IF(FIND("Food Sales",A1),"Found","Not Found")
    >
    > Result in B1: "Found"
    >
    >
    > You don't indicate how you want to 'reference' the found string.
    >
    > HTH
    >
    > Bruce
    >
    >
    > --
    > swatsp0p
    >
    >
    > ------------------------------------------------------------------------
    > swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
    > View this thread: http://www.excelforum.com/showthread...hreadid=393921
    >
    >


  2. #2
    Casino Guy
    Guest

    Re: Using 'If' refer to specific words in a cell containing text

    Thank you. It works perfectly now. I still don't quite understand why the
    first version didn't work.

    Stuart


    "swatsp0p" wrote:

    >
    > Sorry, guess I didn't test my formula well enough... try this:
    >
    > =IF(ISNUMBER(FIND("Food Sales",A1)),"Found","Not Found")
    >
    > Blank cells or numeric cells or text cells not containing the FIND text
    > will return "Not Found" (adjust this response as desired)
    >
    > Let me reiterate that FIND is CasE SenSitiVe. "Sales" <> "sales"
    >
    > Good luck
    >
    > Bruce
    >
    >
    > --
    > swatsp0p
    >
    >
    > ------------------------------------------------------------------------
    > swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
    > View this thread: http://www.excelforum.com/showthread...hreadid=393921
    >
    >


  3. #3
    Casino Guy
    Guest

    Re: Using 'If' refer to specific words in a cell containing text

    The function you wrote works when the condition is true but when the
    condition is false it returns #VALUE! instead of Not Found


    "swatsp0p" wrote:

    >
    > Is this what you are looking for?:
    >
    > A1="Friday Food Sales"
    >
    > B1=IF(FIND("Food Sales",A1),"Found","Not Found")
    >
    > Result in B1: "Found"
    >
    >
    > You don't indicate how you want to 'reference' the found string.
    >
    > HTH
    >
    > Bruce
    >
    >
    > --
    > swatsp0p
    >
    >
    > ------------------------------------------------------------------------
    > swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
    > View this thread: http://www.excelforum.com/showthread...hreadid=393921
    >
    >


  4. #4
    Casino Guy
    Guest

    Re: Using 'If' refer to specific words in a cell containing text

    Thank you. It works perfectly now. I still don't quite understand why the
    first version didn't work.

    Stuart


    "swatsp0p" wrote:

    >
    > Sorry, guess I didn't test my formula well enough... try this:
    >
    > =IF(ISNUMBER(FIND("Food Sales",A1)),"Found","Not Found")
    >
    > Blank cells or numeric cells or text cells not containing the FIND text
    > will return "Not Found" (adjust this response as desired)
    >
    > Let me reiterate that FIND is CasE SenSitiVe. "Sales" <> "sales"
    >
    > Good luck
    >
    > Bruce
    >
    >
    > --
    > swatsp0p
    >
    >
    > ------------------------------------------------------------------------
    > swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
    > View this thread: http://www.excelforum.com/showthread...hreadid=393921
    >
    >


  5. #5
    Casino Guy
    Guest

    Using 'If' refer to specific words in a cell containing text

    Using the 'If' operator I want to refer to a cell containing a text string
    but I only want to reference specific words in the text string.

    Example: If I refer to a cell containing the text string "Friday Food Sales"
    I want to reference only the words "Food Sales"



  6. #6
    Casino Guy
    Guest

    Re: Using 'If' refer to specific words in a cell containing text

    The function you wrote works when the condition is true but when the
    condition is false it returns #VALUE! instead of Not Found


    "swatsp0p" wrote:

    >
    > Is this what you are looking for?:
    >
    > A1="Friday Food Sales"
    >
    > B1=IF(FIND("Food Sales",A1),"Found","Not Found")
    >
    > Result in B1: "Found"
    >
    >
    > You don't indicate how you want to 'reference' the found string.
    >
    > HTH
    >
    > Bruce
    >
    >
    > --
    > swatsp0p
    >
    >
    > ------------------------------------------------------------------------
    > swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
    > View this thread: http://www.excelforum.com/showthread...hreadid=393921
    >
    >


  7. #7
    Casino Guy
    Guest

    Re: Using 'If' refer to specific words in a cell containing text

    Thank you. It works perfectly now. I still don't quite understand why the
    first version didn't work.

    Stuart


    "swatsp0p" wrote:

    >
    > Sorry, guess I didn't test my formula well enough... try this:
    >
    > =IF(ISNUMBER(FIND("Food Sales",A1)),"Found","Not Found")
    >
    > Blank cells or numeric cells or text cells not containing the FIND text
    > will return "Not Found" (adjust this response as desired)
    >
    > Let me reiterate that FIND is CasE SenSitiVe. "Sales" <> "sales"
    >
    > Good luck
    >
    > Bruce
    >
    >
    > --
    > swatsp0p
    >
    >
    > ------------------------------------------------------------------------
    > swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
    > View this thread: http://www.excelforum.com/showthread...hreadid=393921
    >
    >


+ 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