ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Counting characters consisting of numbers in VB (https://www.excelbanter.com/excel-programming/368637-counting-characters-consisting-numbers-vbulletin.html)

svai

Counting characters consisting of numbers in VB
 
Hi!

I have a problem regarding cells(x, y).characters.count i Visual Basic. This
method won't work when the cell value is a number. I've tried to format the
cells as Text in Cell properties, but that doesn't solve the problem. What's
the easiest way around the problem? Without having to enter each cell and put
an apostrophe before the number. Every cell value is an integer.

Thanks
Stefan

mcg

Counting characters consisting of numbers in VB
 

svai napisal(a):
Hi!

I have a problem regarding cells(x, y).characters.count i Visual Basic. This
method won't work when the cell value is a number. I've tried to format the
cells as Text in Cell properties, but that doesn't solve the problem. What's
the easiest way around the problem? Without having to enter each cell and put
an apostrophe before the number. Every cell value is an integer.

Thanks
Stefan

try m = Len(Selection)
mcg



All times are GMT +1. The time now is 05:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com