Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
padding cell with up to 3 zeros
If you use this Custom Formatting pattern...
"09/"0000 Then the cells you apply it to will **display** the user's entries as you want them to appear; so, if your user enters 55 in the cell, it will display as 09/0055. Note, however, that the entry in the cell will still be 55... it will only **look** like 09/0055. Is that what you were after, or did you want to physically change the entry to actually be 09/0055? If so, that will require VB code. -- Rick (MVP - Excel) "Jock" wrote in message ... I need users to input a four digit number between 0001 and 9999 in cells in column "B". Rather than forcing the user to enter leading zeros, is there a way, either using code or formula, to automate the process meaning the user can input "55" for instance, and Excel will automatically add the two leading zeros? I have also set up a 'Custom' number type (format cells) which will place "09/" in front of each entry in column "B". This would need to be taken into account. Example - 09/0055 Thanks, -- Traa Dy Liooar Jock |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell padding | Excel Discussion (Misc queries) | |||
Padding a text column with leading zeros | Excel Discussion (Misc queries) | |||
Padding with leading zeros | Excel Discussion (Misc queries) | |||
Cell margins/padding | Excel Discussion (Misc queries) | |||
merge cell and padding | Excel Programming |