Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I am trying to enter data onto a worksheet from a slide bar on a userform. I need the number to be in a 5 character format i.e. if 5 is entered 00005 is displayed. I can do this by formating to a zip code. The problem occurs when I save as a text file, 00005 becomes 5 again. Is there some code I could write which changes 5 to 00005? Thanks Jo |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveCell.Value = "'" & right(format(Activecell.value,"00000"),5)
-- Regards, Tom Ogilvy "Jo" wrote in message ... Hi I am trying to enter data onto a worksheet from a slide bar on a userform. I need the number to be in a 5 character format i.e. if 5 is entered 00005 is displayed. I can do this by formating to a zip code. The problem occurs when I save as a text file, 00005 becomes 5 again. Is there some code I could write which changes 5 to 00005? Thanks Jo |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You need to set a custom format. Select cells, right click, format cells, number, custom. In the "type" box eneter 0000# that will give you the format you are looking for........ -----Original Message----- Hi I am trying to enter data onto a worksheet from a slide bar on a userform. I need the number to be in a 5 character format i.e. if 5 is entered 00005 is displayed. I can do this by formating to a zip code. The problem occurs when I save as a text file, 00005 becomes 5 again. Is there some code I could write which changes 5 to 00005? Thanks Jo . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert numbers from text format to number 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) | |||
How do i change numbers in text format to number format? | New Users to Excel | |||
excel format cells/Number/Category: Number problem | Excel Discussion (Misc queries) |