Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to count the number of commas/dashes separated values in a cell in Excel?

For example you have a cell containing many commas in Excel, how could you easily count the total number of all commas in this cell? This article provides two methods to solve it quickly!

Count the number of commas/dashes in a cell with formula

Count the number of commas/dashes in a cell with Kutools for Excel’s formula

Easily count the comma separated values in a single cell in Excel

Kutools for Excel collects some commonly-used formulas to help Excel users quickly apply formulas without remembering them exactly, for example the Count times a word appears formula, which can help you quickly count any word or text string in a single cell/column. Full Feature Free Trial 60-day!

ad count times word appears


arrow blue right bubble Count the number of commas/dashes in a cell with formula


This method will introduce a formula to quickly count the total number of all commas or dashes in one cell in Excel. Please do as follows:

Select the cell you will place the counting result, type the formula =LEN(A2)-LEN(SUBSTITUTE(A2,",","")) (A2 is the cell where you will count the commas) into it, and then drag this cell’s AutoFill Handle to the range as you need. See screenshot:

Note: For counting the number of dashes, please replace the commas with the dashes in the formulas as =LEN(A2)-LEN(SUBSTITUTE(A2,"-","")).


arrow blue right bubble Count the number of commas/dashes in a cell with Kutools for Excel’s formula

Sometimes, you may be not able to remember the formula exactly. Here we recommend the Count times a word appears formula of Kutools for Excel, which can help you quickly count a character or a word in a cell easily. Please do as follows:

Kutools for Excel - Combines more than 300 Advanced Functions and Tools for Microsoft Excel

1. Select a blank cell you will place the counting result into, and click Kutools > Formulas > Count times a word appears. See screenshot:

2. In the opening Formula Helper dialog box, please specify the cell where you will count the commas/dashes in the Text box, type the “,” or “-” into the Word box, and click the OK button. See screenshot:

And then the total number of commas/dashes in the specified cell has been counted and returned into the selected cell. If necessary, please drag this cell’s AutoFill Handle to the range as you need. See screenshot:

Note: This Count times a word appears formula is also able to count the specified character or word in a range. See below screenshot:

Kutools for Excel - Includes more than 300 handy Excel tools. Full feature free trial 60-day, no credit card required! Get it now!


Demo: Count the number of commas/dashes in a cell/range

In this Video, the Kutools tab and the Kutools Plus tab are added by Kutools for Excel. If need it, please click here to have a 60-day free trial without limitation!


Select and count cells if contain certain text sting in Excel

Kutools for Excel’s Select SpecifiC Cells feature can help us to quickly select all cells which contain, begin with, end with, or equal to the certain text string in the specified range. Simultaneously, a dialog box will come out and show us how many cells have been selected. Full Feature Free Trial 60-day!

ad select count if contain values


arrow blue right bubbleRelated articles:


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.