How many commas are there in a cell??
[Originally posted by Kousik]
I am writing an Excel VBA macro. I would like to know how to know the number of commas are there in a cell. Each cell has text like this.
Name, Address, City,State,Zip, Tel.
but at times name/address fileds has data like˙ (name, Inc.,)/(1234, Center ct,).
So if i know the total commas in the cell, then i can figure out how many commas are in name/address fields.
Re:How many commas are there in a cell??
[Originally posted by PraveenMenon]
MsgBox UBound(Split(Text1.Text, ","))
can retreive the number of commas in text1.text..
All the best,
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center