+ Reply to Thread
Results 1 to 5 of 5

Count the number of times a character appears in a cell

  1. #1
    Registered User
    Join Date
    07-01-2014
    Location
    Glasgow
    MS-Off Ver
    2013
    Posts
    4

    Count the number of times a character appears in a cell

    Can anyone help with a formula to count the number of times a character appears in a cell e.g. if the word Mississippi was in the cell, I want to count the number of times the letter 's' appears and would expect the formula to return the value 4.

    My spreadsheet has cells containing text with up to 92 characters and I'm looking to count commas before splitting the text but I have over 200,000 rows of data with varying lengths of data, some with commas and some without.

    Thanks,
    Alan

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Count the number of times a character appears in a cell

    SUBSTITUTE can do.
    A1="Mississippi"
    A2=LEN(A1)-LEN(SUBSTITUTE(A1,"s",""))
    Quang PT

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count the number of times a character appears in a cell

    I'm looking to count commas
    Like this...

    =LEN(A1)-LEN(SUBSTITUTE(A1,",",""))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    07-01-2014
    Location
    Glasgow
    MS-Off Ver
    2013
    Posts
    4

    Re: Count the number of times a character appears in a cell

    Thanks bebo021999 and Tony Valko, that's done the trick. Much appreciated.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count the number of times a character appears in a cell

    You're welcome. Thanks for the feedback!

+ 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 the number of times an A appears 5 or more times consecutively
    By CCook310 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-02-2013, 04:02 PM
  2. Count number of times 3,appears
    By ORIELSON in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-06-2013, 08:58 AM
  3. [SOLVED] Count number of times a value appears based on a different cell
    By danfullwood in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-13-2013, 09:38 AM
  4. [SOLVED] How do you count how many times a certain character appears in a cell?
    By Skywalker in forum Excel General
    Replies: 4
    Last Post: 06-01-2012, 12:03 AM
  5. How to count the number of times something appears?
    By Ipinho100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2012, 01:13 PM
  6. Replies: 4
    Last Post: 02-04-2011, 02:15 PM
  7. Count number of times n/s appears
    By hugrl in forum Excel General
    Replies: 2
    Last Post: 11-21-2009, 08:57 AM
  8. [SOLVED] Counting the number of times a specific character appears in a cell
    By PCLIVE in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-04-2005, 01:15 AM

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