Try a formula like the following
=LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"mickbarry"
wrote in
message
...
Hi all,
Just wondering if there is a function which will count the
number of
occurences of a character within a cell.
eg A1 contains "x-ab-c"
I want to know the number of hyphens in that cell (answer 2)
Has anyone come up against this one before?
Regards Mick Barry
Sydney
You don't need a parachute to skydive,
You only need a parachute to skydive twice...
--
mickbarry
------------------------------------------------------------------------
mickbarry's Profile:
http://www.excelforum.com/member.php...o&userid=31028
View this thread:
http://www.excelforum.com/showthread...hreadid=510869