Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entering a 30 digit number
I want to insert a 30 digit number in a cell. When i
insert the number excel rounds it off. Is there any way i can display the 30 digit number without it being rounded off? For Eg. if i enter 123456789123456789123456789 in a cell Excel rounds it off to 1.23456789123456E+26. Which property will I have to set if i am using an excel object in my VB code?? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entering a 30 digit number
You need to either format the cell as text, or prefix it with an apostrophe, as Excel will only
recognise 15 significant digits on a number. Converting it to text will increase that to the relevant string limits. -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL2K & XLXP ---------------------------------------------------------------------------- Attitude - A little thing that makes a BIG difference ---------------------------------------------------------------------------- "Jay" wrote in message ... I want to insert a 30 digit number in a cell. When i insert the number excel rounds it off. Is there any way i can display the 30 digit number without it being rounded off? For Eg. if i enter 123456789123456789123456789 in a cell Excel rounds it off to 1.23456789123456E+26. Which property will I have to set if i am using an excel object in my VB code?? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entering a 30 digit number
ActiveCell.NumberFormat = "@"
activecell.Value = "123456789123456789123456789" or ActiveCell.NumberFormat = "@" varr = cdec("123456789123456789123456789") activecell.Value = cStr(varr) -- Regards, Tom Ogilvy Jay wrote in message ... I want to insert a 30 digit number in a cell. When i insert the number excel rounds it off. Is there any way i can display the 30 digit number without it being rounded off? For Eg. if i enter 123456789123456789123456789 in a cell Excel rounds it off to 1.23456789123456E+26. Which property will I have to set if i am using an excel object in my VB code?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
entering 16 digit numbers - last digit turns to zero | New Users to Excel | |||
Entering a 16 digit number | Excel Discussion (Misc queries) | |||
entering 16 digit number in Excel suffix 0 comes automatically | Excel Discussion (Misc queries) | |||
entering a number of more than 1 digit | Excel Discussion (Misc queries) | |||
entering a 16 digit number - last value changes to 0 | Excel Discussion (Misc queries) |