Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default 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
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
leading zero Jim Excel Discussion (Misc queries) 0 January 5th 10 03:58 PM
leading 0 (zero) MrA Excel Worksheet Functions 4 February 1st 07 01:01 PM
leading zero IRA Excel Discussion (Misc queries) 1 October 26th 05 06:47 PM
add leading "0" blt Excel Worksheet Functions 4 August 27th 05 02:12 PM
Add a leading zero Dave Peterson New Users to Excel 3 March 12th 05 06:14 PM


All times are GMT +1. The time now is 04:21 PM.

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"