ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to add a leading zero (https://www.excelbanter.com/excel-programming/389802-how-add-leading-zero.html)

Peter[_28_]

How to add a leading zero
 
Hi

I have a column of numbers - (telephone numbers actually) and I need
to add a leading zero to each one.

Is there an easy way of doing this other than converting each number
to text and adding the leading zero manually?

--
Cheers

Peter

Please remove the invalid to reply

Bernard Liengme

How to add a leading zero
 
Use Format Cell | Custom format such as 000000000000000 (as many as are
needed)
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Peter" wrote in message
...
Hi

I have a column of numbers - (telephone numbers actually) and I need
to add a leading zero to each one.

Is there an easy way of doing this other than converting each number
to text and adding the leading zero manually?

--
Cheers

Peter

Please remove the invalid to reply




Rick Rothstein \(MVP - VB\)

How to add a leading zero
 
I have a column of numbers - (telephone numbers actually) and I need
to add a leading zero to each one.

Is there an easy way of doing this other than converting each number
to text and adding the leading zero manually?


You can apply a format to your entire column. Click the column header to
select the entire column, right-click that selection and select Format Cells
from the popup list, then select Custom from the Category list, and type
00-000-000-0000 in the Type field (I am presuming you want your telephone
number to look like I have indicated; otherwise, shape the format string as
you need) and, finally, click OK to finish the process off.

Rick


Tom Ogilvy

How to add a leading zero
 
apply a custom number format

000-000-0000

would be the way in the US.

Just to be clear, the numbers do not now have a leading zero. They are just
displayed with a leading zero where appropriate.

--
Regards,
Tom Ogilvy


"Peter" wrote:

Hi

I have a column of numbers - (telephone numbers actually) and I need
to add a leading zero to each one.

Is there an easy way of doing this other than converting each number
to text and adding the leading zero manually?

--
Cheers

Peter

Please remove the invalid to reply


Peter[_28_]

How to add a leading zero
 
On Mon, 21 May 2007 21:25:38 +0100, Peter
wrote:

Hi

I have a column of numbers - (telephone numbers actually) and I need
to add a leading zero to each one.

Is there an easy way of doing this other than converting each number
to text and adding the leading zero manually?


Thanks to all that were kind enough to reply - your formatting
suggestion worked perfectly - exactly what I wanted!
--
Cheers

Peter

Please remove the invalid to reply


All times are GMT +1. The time now is 01:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com