Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jennifer
 
Posts: n/a
Default adding zero's to a text cell

Hi,

I have a cell with 5 digits stored as text. I need to add 3 zeros to the
cell so my total digits in the cell = 7. How can I add the zeros to the
beginning of the cell?
ie. current digits = 4204, desired outcome = 0004204. The cell must remain
in text format.

Thanks,
--
Jennifer
  #2   Report Post  
CLR
 
Posts: n/a
Default

Assuming your numbers are in column A,
in B1 put this and copy down.........

="000"&A1

then Copy PasteSpecial Values on column B to delete the formulas and
delete column A if desired


Vaya con Dios,
Chuck, CABGx3


"Jennifer" wrote in message
...
Hi,

I have a cell with 5 digits stored as text. I need to add 3 zeros to the
cell so my total digits in the cell = 7. How can I add the zeros to the
beginning of the cell?
ie. current digits = 4204, desired outcome = 0004204. The cell must

remain
in text format.

Thanks,
--
Jennifer



  #3   Report Post  
TommySzalapski
 
Posts: n/a
Default


If you are trying to do this in a worksheet function use =text(A1,
"0000000")
This will format the number to always have seven digits to the left of
the decimal point.

If you want to just type it in the cell and have it keep the zeros type
a ' in front of the number like '0045343. The apostrophe just tells
excel to treat those zeros as text and will not print or even show in
the cell.

Szalapski


--
TommySzalapski
------------------------------------------------------------------------
TommySzalapski's Profile: http://www.excelforum.com/member.php...o&userid=25561
View this thread: http://www.excelforum.com/showthread...hreadid=395510

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
Text from text box to cell Greiffenberg Excel Worksheet Functions 6 September 6th 05 09:34 PM
dynamic cell reference within a text string gvm Excel Worksheet Functions 4 July 25th 05 02:40 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
adding a formula in a cell but when cell = 0 cell is blank Mike T Excel Worksheet Functions 5 May 31st 05 01:08 AM
Text is not showing up in cell. Why not? TomBrooklyn Excel Discussion (Misc queries) 3 March 12th 05 02:08 PM


All times are GMT +1. The time now is 02:55 PM.

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

About Us

"It's about Microsoft Excel"