View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron Coderre[_32_] Ron Coderre[_32_] is offline
external usenet poster
 
Posts: 1
Default How to add one digit "0" in the front of a number


There are a few ways to get what you want. Here are 3:

If there are always the same number of digits (like in an Account
Number with 8 digits):

FormatCellsNumber tab
Category: Custom
Type: 00000000
(1234567 would display as 01234567)

or

FormatCellsNumber tab
Category: TEXT
(Since the value would actually be TEXT, you'd have to enter 01234567)


Alternatively, you could use a formula in another cell:

B1: =TEXT(A1,"00000000")
If A1: 1234567 B1 would return the text string "01234567"
Do any of those help?

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=488198