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.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Zillmere, QLD, 4304[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Westfield Belconnen, Benjamin Way, Belconnen, ACT, 2617[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Wanneroo Central Shopping Centre, Rocca Way, Wanneroo, WA, 6065[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Unit 6, 5 Hughes Street, (cnr Nicholson Road & Hughes Street), Canning Vale, WA, 6155[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Desired Result

[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 459"]
<tbody>[TR]
[TD="class: xl63, width: 459"]Zillmere, QLD, 4304[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD][TABLE="width: 459"]
<tbody>[TR]
[TD="class: xl65, width: 459"]Westfield Belconnen, Benjamin Way, Belconnen, ACT, 2617[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD][TABLE="width: 459"]
<tbody>[TR]
[TD="class: xl65, width: 459"]Wanneroo Central Shopping Centre, Rocca Way, Wanneroo, WA, 6065[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD][TABLE="width: 459"]
<tbody>[TR]
[TD="class: xl65, width: 459"]Unit 6, 5 Hughes Street, (cnr Nicholson Road & Hughes Street), Canning Vale, WA, 6155[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

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,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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