How to count comma separated values in a single cell in Excel?
If cell content is separated by comma in a single cell, such as “A1, A2, A3, A4, A5”, and you want to count the total number of comma separated values in this cell, what can you do? In this case, the total comma separated values should be 5. In this article, we will show you two methods of counting comma separated values in a single cell in Excel.
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
You can count the number of items which are separated by comma in a single cell with following formula.
1. Select a blank cell which is adjacent to the cell you want to count comma separated values.
2. Type formula =LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1),",",""))+1 into the formula bar, and then press the Enter key.
You can see the total number of comma separated values is populated in the selected cell. See screenshot:
3. Drag the Fill Handle down to the cells you want to cover this formula to get the results.
With the Split Cells utility of Kutools for Excel, you can easily separate a comma separated value cell with comma, and then get the number of comma separated values in the Status Bar. Please do as follows.
1. Select the cell you want to count comma separated values, and click Kutools > Text > Split Cells. See screenshot:
2. In the Split Cells dialog box, select the Other option, enter a comma to the following box, and then click the OK button.
3. In the popping up Split Cells dialog box, select a blank cell for locating the split values, then click the OK button.
Then the specified cell is split into multiple cells by comma, now you can get the total number of comma separated values in the Status Bar. See screenshot:
Note: You can split multiple cells by commas at the same time by selecting all of these cells firstly and then applying this utility.
- How to count the number of words in a cell or a range cells in Excel?
- How to convert birthdate to age quickly in Excel?
- How to count unique values excluding duplicates in Excel?
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.
To post as a guest, your comment is unpublished.· 2 years agoi have comma separated values in cells like
I want to add the contents of the two cells without repeating the value and also want to get the common value of two cells
expected result = 1,2,3,4,5,6,7,8
i am not getting the exact formula in microsoft excel 2013
Kindly help me
To post as a guest, your comment is unpublished.· 4 years agoWhat if some of the cells underneath are blank? When using the fill handle on the rest of the cells it's coming up with 1 as the total.
To post as a guest, your comment is unpublished.· 2 years agoHello James55, don't know if you ever got an answer but in case you need one. Use an IF statement to check if the cell is blank and then print a "0" or null "" whichever you like.