Thanks for the help. I forgot to mention that the cells
I'm checking can be either numberic or alpha numberic.
I've tried the solution you have suggested without success.
For instance, '0599 could be '53ZZ. when I try the
solution below, I get a len of 2. I've tried a couple of
different variables but can never get it to show a len of
5. If I can get a len of 5 then I could manipulate the
variable.
Thanks for the help.
-----Original Message-----
Entering a data into cell with preceeding " ' " casues it
to be a text.
so '0599 will be treated as text 0599 and Len funtion
will return 4.
In your macro when your refer to the cell value you can
use Val.
e.g. : Instead of Len(Cells(1, 1).Value) use:
Len (Val(Cells(1, 1).Value)).
If you are assinging the cell value to a varible, declare
the variable
as an intger
e.g. :
Dim myInt As Integer
myInt = Cells(1, 1).Value
Or if it is not delcared as integer again use Val
function as under:
myInt = Val(Cells(1, 1).Value)
Sharad
*** Sent via Developersdex http://www.developersdex.com
***
Don't just participate in USENET...get rewarded for it!
.