LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default HOW TO ZERO FILL A CELL THAT CONTAINS OTHER DATA EX. 000123?

Nice... works like a charm. I owe you one!!!

George



"Rick Rothstein" wrote:

Try using the TEXT function instead of concatenation...

=TEXT(A1,"00-000-00000-00-00")

--
Rick (MVP - Excel)


"gwaubrey" wrote in message
...
I have another issue which is exactly related... but a little different
twist.

I have a 14 character long number field that has to be parsed. Similar to
what my colleague has experienced, I had to format the numbers to assure
that
there were a correct number of characters per field.

Here is and example of the number:
03103104290000

When I parse this info I need to retain the exact number of characters in
the string as follows (each number is now in a separate column):
03 103 10429 00 00

By formatting the columns with a custom number format I get the desired
result... ON THE SCREEN.

Now I need to add dashes in between each space so the numbers desired
result
would be:
03-103-10429-00-00

If you use the CONCANTONATE function, or &, to string them together using
the following formula:
=A1&"-"&A2&"-"&A3&"-"&A4&"-"&A5

the result is:
3-103-10429-0-0

So, like my friend here, this is driving me nuts. It gets to be a real
pain
when the 3rd column (5 digets) is preceeded by a "0"... then I only have 4
digits in the field.

Any ideas on how to fix this??




"Mike B" wrote:

I need to fill cells 15 charecters in length with zeroes, the cells have
numbers in them already, ex. 45678 needs to read 000000000045678. The
numers
in the cells are not the same length, some are 4 charecters up to 7
charechters. Can this be done?



 
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
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Last cell of data in a column LACA Excel Discussion (Misc queries) 1 January 17th 06 08:22 PM
Inserting a new line when external data changes Rental Man Excel Discussion (Misc queries) 0 January 11th 06 07:05 PM
data in cell not corresponding with entry Graeme New Users to Excel 1 December 21st 05 04:16 PM
Input Cell in One variable data table Dottore Magistrale Excel Worksheet Functions 0 August 30th 05 06:25 PM


All times are GMT +1. The time now is 05:50 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"