+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    03-18-2010
    Location
    Alaska
    MS-Off Ver
    Excel 2007
    Posts
    3

    (SOLVED) Count words/items in cells

    Hi all
    I have a MASSIVE spreadsheet I need some help formulating results on. There are a total of 650 rows of information that are all similar.
    I have attached a sample as the formating is not corrct when I post

    The dots in the report number represent three samples on one report. I need to be able to count the total number of samples taken, how many were on pipe and how many were on foam, how many were NAD and how many were not NAD. I have tried the COUNTIF, SUMIF, COUNT and several other function, all of which return a 0 result.

    If anyone could help me you would save me numerous hours of going through each report. Thanks guys and have an awesome day
    Attached Files Attached Files
    Last edited by lindsayc; 03-19-2010 at 07:35 PM.

  2. #2
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,155

    Re: Count words/items in cells Excel 2007

    In H4 enter the word: NAD

    in H5 enter: FOAM

    In H6 enter: PIPE

    Now in I4, enter:

    =SUMPRODUCT(--((LEN($E$8:$F$10)-LEN(SUBSTITUTE($E$8:$F$10,H4,"")))/LEN(H4)))

    and copy down

    This counts the number of times those words appear in that range E8:F10

    Is that what you want?

    Edit:

    If you want out how many times the keywords were not those cells, then in J4: =SUM($I$4:$I$6)-I4 copied down... where I4:I6 contains the keyword counts done above.
    Last edited by NBVC; 03-18-2010 at 06:00 PM.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    01-28-2008
    Posts
    54

    Re: Count words/items in cells Excel 2007

    I used:
    =IF(ISERROR(SEARCH("NAD",F8)),0,1)

    This says if you get an error when you search for NAD in F8, the value is 0 (no occurrences)
    If you don't get an error, the value is 1 (NAD is contained there).
    Then count the 1's to see how many cells contain NAD at least once

    P.S. Column F looked like it contained "NAD". However, when I made it wider, I could see that it contained much more.

  4. #4
    Registered User
    Join Date
    03-18-2010
    Location
    Alaska
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Count words/items in cells Excel 2007

    Thats pretty great!! Thanks!!!
    Any idea on how I can count the total number of samples taken (Column D)
    Thank so much for your help =)

  5. #5
    Registered User
    Join Date
    01-28-2008
    Posts
    54

    Re: Count words/items in cells Excel 2007

    Is Y-520-A a single sample? If so, you need separating unique characters, such as a /, and you can count those occurrences like you counted NAD.

  6. #6
    Registered User
    Join Date
    01-28-2008
    Posts
    54

    Re: Count words/items in cells Excel 2007

    In our original post, I don't understand:
    "The dots in the report number represent three samples on one report."

    C8 has 2dots and 2 report numbers.How many reports is that?

  7. #7
    Registered User
    Join Date
    03-18-2010
    Location
    Alaska
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Count words/items in cells Excel 2007

    Yes Y-520-A is a single sample, with the back up data read straight across. So basically each pipe has several samples on different areas and/or materials.
    So I would have to add a distinguishing mark to each sample number?
    In the example Y-520-A would the - work? If it counted it twice I could just divide the number by 2?
    As for the dots, the first report only has one sample on that report, the second report has four samples. Hope that helps!
    Last edited by lindsayc; 03-18-2010 at 06:42 PM.

  8. #8
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,155

    Re: Count words/items in cells Excel 2007

    Quote Originally Posted by lindsayc View Post
    So I would have to add a distinguishing mark to each sample number?
    In the example Y-520-A would the - work? If it counted it twice I could just divide the number by 2?
    Yes the - would work:

    =SUMPRODUCT(--(LEN(D8:D10)-LEN(SUBSTITUTE(D8:D10,"-",""))))/2

    This gives 13 for your sample workbook.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0