Count Occurrence of a Specific Character in a cell

Blessy Clara

Board Regular
Joined
Mar 28, 2010
Messages
204
Office Version
  1. 365
Platform
  1. Windows
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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

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,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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