+ Reply to Thread
Results 1 to 12 of 12

Counting cells containing certain words

Hybrid View

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    Seattle, WA
    MS-Off Ver
    Office 2013
    Posts
    55

    Counting cells containing certain words

    Im trying to put together a formula that counts the specific # of times a certain word pops up in a range of cells.

    I've been using Countif function and its so far been working when I type in quotes the word I want to count, however, it'd be great if I can link to a cell with the text and drag n drop so I dont have to reenter each word Im trying to count.

    Hope that makes sense. Please see attached if interested for example. Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Counting cells containing certain words

    Do you mean in B22 and copy down?

    =COUNTIF($A$2:$N$18, A21)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Counting cells containing certain words

    instead of...=COUNTIF($A$2:$N$18, "DDR")
    use this .....=COUNTIF($A$2:$N$18, A21)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    08-24-2012
    Location
    Seattle, WA
    MS-Off Ver
    Office 2013
    Posts
    55

    Re: Counting cells containing certain words

    Do u know how toextend the range across non-continuous cells? E.g. say I wanna count all cells in A1:A10 and C1:C10, excluding column B. Is that possible with a Countif Formula?

  5. #5
    Registered User
    Join Date
    08-24-2012
    Location
    Seattle, WA
    MS-Off Ver
    Office 2013
    Posts
    55

    Re: Counting cells containing certain words

    Haha wow now I feel smart Thanks for pointing out! Works great now.

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Counting cells containing certain words

    As you use Excel 2010, take a look to COUNTIFS function.

    Or in SUMPRODUCT for All Excel versions.

  7. #7
    Registered User
    Join Date
    08-24-2012
    Location
    Seattle, WA
    MS-Off Ver
    Office 2013
    Posts
    55

    Re: Counting cells containing certain words

    FDibbins,

    Kinda applied ur idea instead of subtracting, did...

    =SUM(COUNTIF(A2:A10, A21),COUNTIF(C1:C10,A21))

    Formula might've been lil different from above. But more or less that convention worked.

    Thanks again!

    Dom

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Counting cells containing certain words

    knee-jerk answer...
    =COUNTIF($A$2:$C$18, A21)-COUNTIF($B$2:$B$18, A21)

  9. #9
    Registered User
    Join Date
    08-24-2012
    Location
    Seattle, WA
    MS-Off Ver
    Office 2013
    Posts
    55

    Re: Counting cells containing certain words

    Not familiar with SUMPRODUCT, but Ill try that. Tried Countif, seems like that doesnt work for non-continuous cells.

    Dom

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Counting cells containing certain words

    Happy to help. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neet and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below)

  11. #11
    Registered User
    Join Date
    03-30-2013
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Counting cells containing certain words

    I would use the "Find" function and link to the range of cells I'm looking for.
    If it doesn't find it, it will render an error.
    Then I'd use the =IFERROR function to weed out the errors.
    You'll have a list of the ones that match, and the ones that don't will be blank, or whatever value you've assigned in the iferror formula.

    Moderators note: Please do not post links to commercial web sites. I have removed the link

    Thanks
    Last edited by FDibbins; 03-31-2013 at 01:14 AM.

  12. #12
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Counting cells containing certain words

    @ Excel-Help.net,
    THAT has got to be as close to a Rule 13 violation as I've seen in quite awhile..lol
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

+ 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