Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count occurences in string 1

Status
Not open for further replies.

sylve

Programmer
Jan 18, 2005
58
CA
What i want to do is pretty simple. Count the number of "." there are in a string.

Isn't there a easy method to do this?
 
Hi sylve,

The easiest way I know ..

[blue][tt] Len(YourString) - Len(Replace(YourString, ".", ""))[/tt][/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top