+ Reply to Thread
Results 1 to 4 of 4

Summing specific texts

  1. #1
    Registered User
    Join Date
    05-17-2005
    Posts
    2

    Unhappy Summing specific texts

    Hi, please help me, I need assistance:

    I am trying to find the total number of times a specific word has been entered in a column. I tried using LEN and SUBSTITUE but it seems like that only works if it's a single letter?

    Here's the details - some one much smarter than I am will surely have an answer for me?

    Word is Toffee
    (and is written in A1)

    The field is D1 to D600 (a text formatted column containing single words in each cell)

    I have had some success with the LEN and SUBSTITUTE formula when using a single letter but I have had to write out the whole field as D1&D2&D3&D4&D5... etc, it wouldn't work using D1:D10) - I dont want to write 1 to 600 with & between each entry - is there another way?

    The Total should be supplied in B1 (in number format)

    Look forward to hearing your response
    Cheers
    LOSTLADY!


  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    LostLady: We don't want you to be lost for too long. Use COUNTIF with a 'wildcard' to find your search word in a range, as such:

    In B1 place this formula:

    =COUNTIF(D1:D600,"*TOFFEE*")
    --- This will find all cases of ToFfeE in your range, such as "Toffee Crisp", "Ground TOFFEE", "nuts toffee coated" will return 3

    If you want to search for the contents of A1, then use:

    =COUNTIF(D1:D600,"*"&A1&"*")

    Does this work for you?

    Bruce
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Ray A
    Guest

    RE: Summing specific texts

    In cell b1 format to number then use =countif(d1:d600,"toffee")

    "LostLady" wrote:

    >
    > Hi, please help me, I need assistance:
    >
    > I am trying to find the total number of times a specific word has been
    > entered in a column. I tried using LEN and SUBSTITUE but it seems like
    > that only works if it's a single letter?
    >
    > Here's the details - some one much smarter than I am will surely have
    > an answer for me?
    >
    > Word is *Toffee *
    > (and is written in A1)
    >
    > The field is *D1 to D600 *(a text formatted column containing single
    > words in each cell)
    >
    > -I have had some success with the LEN and SUBSTITUTE formula when using
    > a single letter but I have had to write out the whole field as
    > D1&D2&D3&D4&D5... etc, it wouldn't work using D1:D10) - I dont want to
    > write 1 to 600 with & between each entry - is there another way?-
    >
    > The Total should be supplied in *B1* (in number format)
    >
    > Look forward to hearing your response
    > Cheers
    > LOSTLADY!
    >
    >
    >
    >
    > --
    > LostLady
    > ------------------------------------------------------------------------
    > LostLady's Profile: http://www.excelforum.com/member.php...o&userid=23447
    > View this thread: http://www.excelforum.com/showthread...hreadid=377747
    >
    >


  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    If the word "Toffee" can appear more than once in a cell and you want to know how many times Toffee appears in a range of cells

    Ttry this:

    =SUMPRODUCT(LEN(D1:D600)-LEN(SUBSTITUTE(UPPER(D1:D600),UPPER(A1),"")))/LEN(A1)

    Example:
    A1: Toffee and donuts
    A2: Toffee is not Toffee-free.

    Count of Toffee is 3.

    Note: SUBSTITUTE is case sensitive, hence the UPPER function.

    I hope that helps.

    Ron
    Last edited by Ron Coderre; 06-09-2005 at 01:20 PM.

+ 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