Count Occurrence of a Specific Character in a cell

Blessy Clara

Board Regular
Joined
Mar 28, 2010
Messages
201
Hi

Thank you in Advance,
I have a column of Address, and i would like to know the Number of times, a comma occurs in the cell.

Zillmere, QLD, 4304
Westfield Belconnen, Benjamin Way, Belconnen, ACT, 2617
Wanneroo Central Shopping Centre, Rocca Way, Wanneroo, WA, 6065
Unit 6, 5 Hughes Street, (cnr Nicholson Road & Hughes Street), Canning Vale, WA, 6155

<tbody>
</tbody>


Desired Result

Zillmere, QLD, 4304

<tbody>
</tbody>
2
Westfield Belconnen, Benjamin Way, Belconnen, ACT, 2617

<tbody>
</tbody>
4
Wanneroo Central Shopping Centre, Rocca Way, Wanneroo, WA, 6065

<tbody>
</tbody>
4
Unit 6, 5 Hughes Street, (cnr Nicholson Road & Hughes Street), Canning Vale, WA, 6155

<tbody>
</tbody>
5

<tbody>
</tbody>
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Excel 2010
AB
1Zillmere, QLD, 43042
2Westfield Belconnen, Benjamin Way, Belconnen, ACT, 26174
Sheet1
Cell Formulas
RangeFormula
B1=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))
B2=LEN(A2)-LEN(SUBSTITUTE(A2,",",""))
 
Upvote 0
Blessy Clara,

Here is another formula to try.


If A1 contains Zillmere, QLD, 4304

Then, in B1 enter the following formula:

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


B1 will display 2
 
Upvote 0
Blessy Clara,

Thanks for the feedback.

You are very welcome. Glad I could help.

And, come back anytime.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,183
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top