+ Reply to Thread
Results 1 to 6 of 6

Counting Cells meeting certain criteria

  1. #1
    Forum Contributor
    Join Date
    11-02-2007
    Posts
    109

    Counting Cells meeting certain criteria

    Hi,

    I have a worksheet that has a list of terms in one column, that vary from 1 to 5 words in length. I want to be able to put in a formula that will detail how many words in the list have 1 word, how many have 2 words, etc.

    I also have a list of conditionally formatted cells that show even H/M/L and are colour coded as such. I want also to do a similar thing with these and be able to show how many cells have H, how many have M, and how many have L.

    This is also part of a filtered list. If I apply a filter, how can I make the formula do a subtotal so that it only shows the count for the list that is filtered? I know how to do a SUBTOTAL for a filtered list, however not sure how you would apply this to a count of the cells as above.

    I have attached an Excel 97 workbook with an example of what I am trying to achieve.

    Thanks in advance

  2. #2
    Registered User
    Join Date
    10-27-2011
    Location
    Bay Area, California, USA
    MS-Off Ver
    Excel 2000
    Posts
    15

    Re: Counting Cells meeting certain criteria

    As far as I know there's no built in function to count words in a cell or range of cells.
    As a work around you can count spaces in a cell, then add 1.... but that will only work if there is only 1 space between words, and no leading or trailing spaces.

    Something like this can put you in the right direction:
    Please Login or Register  to view this content.

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

    Re: Counting Cells meeting certain criteria

    manohoo, you are on good path:
    From your formula you just need to combine for whole range:

    =SUMPRODUCT(--(LEN($F$3:$F$9)-LEN(SUBSTITUTE($F$3:$F$9," ",""))+1=ROWS(F$11:F11)))

    Ozwilly, please don't open duplicated posts.

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Counting Cells meeting certain criteria

    Hello
    Manohoo is right it will count words w/ single space but maybe you could trim the spaces,leading etc. to become 1 space, like this:


    Please Login or Register  to view this content.
    HTH
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,660

    Re: Counting Cells meeting certain criteria


  6. #6
    Forum Contributor
    Join Date
    11-02-2007
    Posts
    109

    Re: Counting Cells meeting certain criteria

    Thanks everyone, and my apologies, I did research the forum but did not realize it was a duplicated topic

    One one other issue which I mentioned, is using this formula in a filtered list. How would I modify it so that it only counted the entries in the filtered list???

+ 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