+ Reply to Thread
Results 1 to 5 of 5

Regarding COUNT Specific String

  1. #1
    Registered User
    Join Date
    04-10-2024
    Location
    Bangladesh
    MS-Off Ver
    2016
    Posts
    2

    Regarding COUNT Specific String

    Hello all.

    I want to count�*a specific�*string "Mr. Tom"�*from a column of data. I am trying the formula "COUNTIF(E1:E4,"*Mr. Tom*")" but it returns 3. My expected return�*is 4. Please�*advise.

    COUNTIF.png

    Thanks�*in advance.

    Regards.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Regarding?*COUNT Specific?*String

    Try this:

    =SUM((LEN(E1:E4)-LEN(SUBSTITUTE(E1:E4,"Mr. Tom","")))/LEN("Mr. Tom"))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,422

    Re: Regarding?*COUNT Specific?*String

    You might need to array-enter Glenn's formula (i.e. Ctrl-Shift-Enter, rather than just Enter) if you are using XL2016.

    Pete

  4. #4
    Registered User
    Join Date
    04-10-2024
    Location
    Bangladesh
    MS-Off Ver
    2016
    Posts
    2

    Re: RegardingÂ*COUNT SpecificÂ*String

    Many many thanks. It works perfectly.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Regarding COUNT Specific String

    You're welcome. Thanks for letting us know that you got an answer.




    Please take a moment and consider clicking the "Add Reputation" button at the foot of any of the posts of anyone who helped you reach a solution here today.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Count all the words in a string before a specific word occur
    By PaulM100 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-22-2019, 04:28 AM
  2. Macro to count a specific substring within a string
    By Daddy007 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-30-2015, 03:25 PM
  3. Replies: 2
    Last Post: 11-18-2014, 06:26 AM
  4. VBA Find all instances of a specific string and copying the number of count in cell
    By dilshandil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2013, 10:27 PM
  5. Replies: 5
    Last Post: 02-04-2013, 05:32 PM
  6. search for specific string in the sheet and count occurance of it
    By kmksprasad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-23-2012, 02:32 PM
  7. search for specific string in the sheet and count occurance of it
    By kmksprasad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2012, 01:50 PM

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.6.0 RC 1