+ Reply to Thread
Results 1 to 4 of 4

COUNTIF text where there is more than one word in a cell

  1. #1
    Abi
    Guest

    COUNTIF text where there is more than one word in a cell

    I tried the COUNTIF function on a range of cells to count a specific word in
    that range, but these cells have multiple words in them and the formula
    doesn't recognize the words then.

    How do I expand my countif formula to get what I need?

    EXAMPLE
    A1: apple and orange
    A2: apple and banana
    A3: apple and grapes and orange
    A4: pineapple

    =COUNTIF(A1:A4,"apple") is what I currently have but it returns a value of
    zero. How do I get it to return the value of four that I'm looking for?

    Thanks!

  2. #2
    Peo Sjoblom
    Guest

    Re: COUNTIF text where there is more than one word in a cell

    =COUNTIF(A1:A4,"*apple*")



    --
    Regards,

    Peo Sjoblom

    (No private emails please, for everyone's
    benefit keep the discussion in the newsgroup/forum)



    "Abi" <[email protected]> wrote in message
    news:[email protected]...
    >I tried the COUNTIF function on a range of cells to count a specific word
    >in
    > that range, but these cells have multiple words in them and the formula
    > doesn't recognize the words then.
    >
    > How do I expand my countif formula to get what I need?
    >
    > EXAMPLE
    > A1: apple and orange
    > A2: apple and banana
    > A3: apple and grapes and orange
    > A4: pineapple
    >
    > =COUNTIF(A1:A4,"apple") is what I currently have but it returns a value of
    > zero. How do I get it to return the value of four that I'm looking for?
    >
    > Thanks!




  3. #3
    Biff
    Guest

    COUNTIF text where there is more than one word in a cell

    Hi!

    Here's one way:

    =COUNTIF(A1:A4,"*apple*")

    The asterisks are wildcards.

    Biff

    >-----Original Message-----
    >I tried the COUNTIF function on a range of cells to count

    a specific word in
    >that range, but these cells have multiple words in them

    and the formula
    >doesn't recognize the words then.
    >
    >How do I expand my countif formula to get what I need?
    >
    >EXAMPLE
    >A1: apple and orange
    >A2: apple and banana
    >A3: apple and grapes and orange
    >A4: pineapple
    >
    >=COUNTIF(A1:A4,"apple") is what I currently have but it

    returns a value of
    >zero. How do I get it to return the value of four that

    I'm looking for?
    >
    >Thanks!
    >.
    >


  4. #4
    Registered User
    Join Date
    01-20-2005
    Posts
    21

    Referencing a cell

    It is also posible to reference a cell rather than entering "apples" eg if the criteria is "apples" and that is entered in cell b1 then the formula would be:

    =COUNTIF(A1:A5,"*"&B1&"*")
    Last edited by frankybenali; 01-20-2005 at 07:30 AM.

+ 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