+ Reply to Thread
Results 1 to 7 of 7

Counting a specific character

  1. #1
    Registered User
    Join Date
    11-24-2015
    Location
    Levin
    MS-Off Ver
    2010 version 14
    Posts
    4

    Counting a specific character

    I want a formula to count "," in a row. The spreadsheet records individuals wins over the years in different events. The events are in columns and each individual is a row. Their wins are recorded as a year for example if they won an event this year the value in the event column in their row would be 15, The "," is use to differentiate between years. So if a person wins the same event in 1992 and again in 2013 the cell value would be 92,13,

    One of the column shows how many wins each person has over all events, so I need a formula to add up all the ",". In the example below this person has won 5 events.

    Fours Triples Pairs Singles Fours Triples Pairs Singles Fours Pairs
    99, 98,00, 00,06,

    thanks for all help

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,144

    Re: Counting a specific character

    Try

    =LEN(A2)-LEN(SUBSTITUTE(A2,",",""))

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Counting a specific character

    Not sure I understand the logic of your overall goal..

    But you can count how many commas are in a single cell like this

    =LEN(A1)-LEN(SUBSTITUTE(A1,",",""))

  4. #4
    Registered User
    Join Date
    11-24-2015
    Location
    Levin
    MS-Off Ver
    2010 version 14
    Posts
    4

    Re: Counting a specific character

    Thanks for the quick response, I had already tried something similar but keep getting errors. The amount of commas I want to count is from columns F to O not a single cell. I tried your suggestion with this formula below but get an error message. "You have entered to many arguments for this formula"

    =LEN(F30:O30)-LEN(SUBSTITUTE(F30:O30),",",""))

  5. #5
    Registered User
    Join Date
    11-24-2015
    Location
    Levin
    MS-Off Ver
    2010 version 14
    Posts
    4

    Re: Counting a specific character

    I also tried this

    =LEN(F30:O30)-LEN(SUBSTITUTE(F30:O30,",",""))

    The value in the cell is #VALUE!

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Counting a specific character

    Try

    =SUMPRODUCT(LEN(F30:O30)-LEN(SUBSTITUTE(F30:O30,",","")))

  7. #7
    Registered User
    Join Date
    11-24-2015
    Location
    Levin
    MS-Off Ver
    2010 version 14
    Posts
    4

    Re: Counting a specific character

    Thanks for the reply Jonmo1

    Working perfectly, brilliant!
    Last edited by support_nz; 11-24-2015 at 08:24 PM.

+ 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. counting instances of a character within a string
    By mikelee101 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-15-2019, 05:28 AM
  2. Counting single character in range
    By ossa in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-19-2013, 08:01 AM
  3. [SOLVED] Counting Cells with Particular Character or String value
    By anir_sarkar1 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 01-20-2013, 08:36 AM
  4. Replies: 4
    Last Post: 09-06-2011, 10:36 AM
  5. Replace specific character in specific position
    By BMR in forum Excel General
    Replies: 4
    Last Post: 07-22-2011, 10:51 AM
  6. How to remove specific character from specific shell
    By ramki in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-07-2008, 08:00 AM
  7. [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