polarisking
Member
I'm having trouble with VBA converting what should be a text value into a Scientific Notation value.
For Value = 613609A60, the formula Format(Value,"000000000") returns
613609A60, as we'd expect.
For Value = 613609E60, the formula Format(Value,"000000000")
613609000000000000000000000000000000000000000000000000000000000000, as we'd expect the all numeric save the 7th position = E denoting Scientific Notation.
However . . .
For Value = 613609D60, the formula Format(Value,"000000000") returns
613609000000000000000000000000000000000000000000000000000000000000
NOT what we'd expect (at least me).
Am I missing something obvious? I'd expect 613609D60 to come back as 613609D60.
Why am I doing this? US Cusips can begin with leading zeros and this little piece of code insures (so I thought ), I'd end up with a length of 9 each time. The source file's value format is general and that's why I'm having to compensate.
Thank you, in advance, for any assistance.
For Value = 613609A60, the formula Format(Value,"000000000") returns
613609A60, as we'd expect.
For Value = 613609E60, the formula Format(Value,"000000000")
613609000000000000000000000000000000000000000000000000000000000000, as we'd expect the all numeric save the 7th position = E denoting Scientific Notation.
However . . .
For Value = 613609D60, the formula Format(Value,"000000000") returns
613609000000000000000000000000000000000000000000000000000000000000
NOT what we'd expect (at least me).
Am I missing something obvious? I'd expect 613609D60 to come back as 613609D60.
Why am I doing this? US Cusips can begin with leading zeros and this little piece of code insures (so I thought ), I'd end up with a length of 9 each time. The source file's value format is general and that's why I'm having to compensate.
Thank you, in advance, for any assistance.