#1   Report Post  
blt
 
Posts: n/a
Default add leading "0"

How can I mass add a 0 to a field.

example: 544 = 0544 But I have about 2000 lines and I would like to mass
add them.
  #2   Report Post  
Gary's Student
 
Posts: n/a
Default

Let's assume that the cells are in a column (say A):
1. insert a helper column near by
2. format the cells in the helper column as text
3. in the helper column insert
="0"&A1
4. copy this down
5. copy the helper column and paste it as value back into Column A.
__________________________________________________ ___

You can avoid this if all your numbers are of fixed length, then use custom
formatting:

Format Cells Number Custom

and enter as many zeros as you like
--
Gary's Student


"blt" wrote:

How can I mass add a 0 to a field.

example: 544 = 0544 But I have about 2000 lines and I would like to mass
add them.

  #3   Report Post  
blt
 
Posts: n/a
Default



"blt" wrote:

How can I mass add a 0 to a field.

example: 544 = 0544 But I have about 2000 lines and I would like to mass
add them.

  #4   Report Post  
Ashish Mathur
 
Posts: n/a
Default

Hi,

Try this as well. You will not need a helper column

Select the cells and do a Ctrl+1

Now go to custom in the Number tab and click on General on the RHS

Before general add the following (with the quotes) - "0"

Regards,

Ashish Mathur

"blt" wrote:

How can I mass add a 0 to a field.

example: 544 = 0544 But I have about 2000 lines and I would like to mass
add them.

  #5   Report Post  
Gary's Student
 
Posts: n/a
Default

Ashish:

Your solution is very good. It adds the leading zero to any size number and
still leaves it a number suitable for calculations,
--
Gary's Student


"Ashish Mathur" wrote:

Hi,

Try this as well. You will not need a helper column

Select the cells and do a Ctrl+1

Now go to custom in the Number tab and click on General on the RHS

Before general add the following (with the quotes) - "0"

Regards,

Ashish Mathur

"blt" wrote:

How can I mass add a 0 to a field.

example: 544 = 0544 But I have about 2000 lines and I would like to mass
add them.

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
Concatenation with leading zeros Laura K Excel Worksheet Functions 6 August 27th 05 11:55 PM
Leading zeros Paul Excel Discussion (Misc queries) 4 June 12th 05 04:04 AM
save text field w/ leading zeros in .csv format & not lose zeros? Ques Excel Discussion (Misc queries) 1 May 4th 05 06:21 PM
Leading zeros JC Excel Discussion (Misc queries) 9 February 1st 05 02:33 PM
CSV leading zeroes Tim_nol Excel Discussion (Misc queries) 2 December 28th 04 08:19 PM


All times are GMT +1. The time now is 04:54 AM.

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"