Posted to microsoft.public.excel.programming
|
|
lenght of a number
In addition to Bob
Len(Format(start,"0.0"))
would return 3 for the value 5.0
--
Regards
Frank Kabel
Frankfurt, Germany
Bob Phillips wrote:
Have you declared start as a type Double? If so, you are getting the
length of a double variable, 8 bytes. This only works properly on a
string variable. You could trying casting to string like
Len(CStr(start))
but be aware that 5.0 will return 1, as the value is 5.
"dreamer " wrote in message
...
Is there something that I should know about function lenght and
numbers?
I have used this in a loop:
[vb]
Left (start, Len(start)-2)
[vb]
with "start" being a number that changes from 5.0 to 110.5. And
Len(start) always returns 8 as lenght of the number??
What am I doing wrong?
---
Message posted from http://www.ExcelForum.com/
|