Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell padding Jennifer Excel Discussion (Misc queries) 1 December 3rd 09 10:37 PM
Padding a text column with leading zeros Chris Excel Discussion (Misc queries) 6 October 29th 07 10:45 PM
Padding with leading zeros GKW in GA Excel Discussion (Misc queries) 2 July 4th 07 12:42 AM
Cell margins/padding ll17 Excel Discussion (Misc queries) 1 May 7th 07 11:10 PM
merge cell and padding dwight Excel Programming 1 May 3rd 05 04:49 PM


All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"