counting characters in a cell

G

Guest

how do i count the number of characters in a cell

so if cell A1 has the day = to "05"....how do i know that there are 2
characters in the cell?

thank you
 
G

Gary Keramidas

basically the same way

Sub test()
Dim numChars As Long
numChars = Len(Worksheets("Sheet1").Range("A1"))
MsgBox numChars
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top