Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Format a cell to keep leading zeros.
I often deal with account numbers with leading zeros. When I place them in a
cell Excel automatically deletes the leading zeros. Is there a way to format the cell to hold the zeros? |
#2
|
|||
|
|||
Use a custom number format of 000000 or as many zero as you need.
-- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Shadyhosta" wrote in message ... I often deal with account numbers with leading zeros. When I place them in a cell Excel automatically deletes the leading zeros. Is there a way to format the cell to hold the zeros? |
#3
|
|||
|
|||
Another approach is to use =FORMAT(A4,"0000000") which creates a string with
the correct number of leading zeros, rather than just displaying it in this way. Regards, David Jessop "Chip Pearson" wrote: Use a custom number format of 000000 or as many zero as you need. "Shadyhosta" wrote in message ... I often deal with account numbers with leading zeros. When I place them in a cell Excel automatically deletes the leading zeros. Is there a way to format the cell to hold the zeros? |
#4
|
|||
|
|||
David
Excel has no FORMAT Function except in VBA. I think you may have meant =TEXT(A4,"0000000") This would leave the numbers as text and could not be readily used for calculations. Gord Dibben Excel MVP On Wed, 5 Jan 2005 09:13:06 -0800, David Jessop <David wrote: Another approach is to use =FORMAT(A4,"0000000") which creates a string with the correct number of leading zeros, rather than just displaying it in this way. Regards, David Jessop "Chip Pearson" wrote: Use a custom number format of 000000 or as many zero as you need. "Shadyhosta" wrote in message ... I often deal with account numbers with leading zeros. When I place them in a cell Excel automatically deletes the leading zeros. Is there a way to format the cell to hold the zeros? |
#5
|
|||
|
|||
Hey Chip
I'm doing an upload that requires a "number" format. However, alot of the numbers have leading zeroes. Is "custom" 0000 considered a "number" formatted field. "Chip Pearson" wrote: Use a custom number format of 000000 or as many zero as you need. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Shadyhosta" wrote in message ... I often deal with account numbers with leading zeros. When I place them in a cell Excel automatically deletes the leading zeros. Is there a way to format the cell to hold the zeros? |
#6
|
|||
|
|||
Put an Apostrophe (ie..'0001114) at the beginning. excel will then treat your account number as text Odie -- Odicus ------------------------------------------------------------------------ Odicus's Profile: http://www.excelforum.com/member.php...o&userid=25610 View this thread: http://www.excelforum.com/showthread...hreadid=331964 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
date format within a cell containing a formula | Excel Discussion (Misc queries) | |||
Can I set the numerical type of Cell to Hex format | Excel Discussion (Misc queries) | |||
Show Blank is cell value=0 but count as a zero in sum. How to format this cell ? | Excel Discussion (Misc queries) | |||
Date on two lines using a custom cell format possible? | Excel Discussion (Misc queries) | |||
cell format problem | Excel Discussion (Misc queries) |