Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Howday everyone,
Just a quick question here. How can I disable scientific notation to kick in when manipulating a variable in VBA, i.e. to display/use/... its value as 123456789123456789 as exactly it should be rather than 1.23E+18. Basically scientific notation needs to be totally switched off here. The variable is of type Single by the way. Many thanks Frank |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try the Format() formula. Something like:
Let vMyVar = Format(vMyVar, "00000000000000000.0") HTH, tchid2 "OrientalPearl" wrote: Howday everyone, Just a quick question here. How can I disable scientific notation to kick in when manipulating a variable in VBA, i.e. to display/use/... its value as 123456789123456789 as exactly it should be rather than 1.23E+18. Basically scientific notation needs to be totally switched off here. The variable is of type Single by the way. Many thanks Frank |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the solution, tchid2. The other thing I didn't make clear is
that it's a variable, i.e. its value is unknown, can be 999 or 999999999999999999999999. So Im not exactly sure whether Format() can do this or not since I dont really know how many 0s I should place there. Is another more generic way to totally toss scientific notation out of the window regardless of the number of digits?? Appreciate your help! Frank |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have figured out the solution myself, which is provided here and
hopefully will of some help to others in the futu It's not complicated really...just need to declare the variable 'AS Variant', which will keep the numeric representation all the time (well before its boundary values are exceeded) Good luck to everyone involved in VBA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I add phone number format as a permanent custom format? | Excel Discussion (Misc queries) | |||
Replace million-billion number format to lakhs-crores format | Excel Discussion (Misc queries) | |||
convert text-format number to number in excel 2000%3f | Excel Discussion (Misc queries) | |||
Number format based on number format of another cell in another workbook | Excel Programming | |||
excel format cells/Number/Category: Number problem | Excel Discussion (Misc queries) |