#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 65
Default Inserting a "0"

Hello

In a spreadsheet containing UK phone numbers, all numbers should begin with
a zero, but when we pull off a report and copy and paste it into Excel,
depending on what's been input at source, some of the entries lack the zero.

Is there a way of formatting the column so that, if no zero appears at the
start of a phone number, one can be inserted at the start of each number?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default Inserting a "0"

On May 8, 8:00 am, bollard wrote:
Hello

In a spreadsheet containing UK phone numbers, all numbers should begin with
a zero, but when we pull off a report and copy and paste it into Excel,
depending on what's been input at source, some of the entries lack the zero.

Is there a way of formatting the column so that, if no zero appears at the
start of a phone number, one can be inserted at the start of each number?

Thanks.


If your number is of fixed length (say xxxx-xxxx) you can format like
the following:

Format-Cells-Number-Custom-0000-0000

This will turn the number 1234567 into 0123-4567.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 65
Default Inserting a "0"

Hello

Many thanks for that.

it works a treat.

"Edward" wrote:

On May 8, 8:00 am, bollard wrote:
Hello

In a spreadsheet containing UK phone numbers, all numbers should begin with
a zero, but when we pull off a report and copy and paste it into Excel,
depending on what's been input at source, some of the entries lack the zero.

Is there a way of formatting the column so that, if no zero appears at the
start of a phone number, one can be inserted at the start of each number?

Thanks.


If your number is of fixed length (say xxxx-xxxx) you can format like
the following:

Format-Cells-Number-Custom-0000-0000

This will turn the number 1234567 into 0123-4567.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Inserting a "0"

Hi

If you format the receiving cells as Text before copying and pasting,
then the leading zero will be retained.

If you already have entries and some do not have leading zero's then you
could enter in a spare column
=IF(LEFT(A1)="0",A1,"0"&A1)
copy down as far as required.
Then copy this new range of cells, and Paste SpecialValues back over
the original.

--
Regards

Roger Govier


"bollard" wrote in message
...
Hello

In a spreadsheet containing UK phone numbers, all numbers should begin
with
a zero, but when we pull off a report and copy and paste it into
Excel,
depending on what's been input at source, some of the entries lack the
zero.

Is there a way of formatting the column so that, if no zero appears at
the
start of a phone number, one can be inserted at the start of each
number?

Thanks.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 65
Default Inserting a "0"

Hi Roger

Many thanks for this.

It works a treat!

"Roger Govier" wrote:

Hi

If you format the receiving cells as Text before copying and pasting,
then the leading zero will be retained.

If you already have entries and some do not have leading zero's then you
could enter in a spare column
=IF(LEFT(A1)="0",A1,"0"&A1)
copy down as far as required.
Then copy this new range of cells, and Paste SpecialValues back over
the original.

--
Regards

Roger Govier


"bollard" wrote in message
...
Hello

In a spreadsheet containing UK phone numbers, all numbers should begin
with
a zero, but when we pull off a report and copy and paste it into
Excel,
depending on what's been input at source, some of the entries lack the
zero.

Is there a way of formatting the column so that, if no zero appears at
the
start of a phone number, one can be inserted at the start of each
number?

Thanks.






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
Inserting an "Add-In" in Excel "Com Add-Ins" box Jean Gauthier Excel Discussion (Misc queries) 3 October 31st 06 05:50 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
inserting a conditional "go to" command on a excel "if" function velasques Excel Worksheet Functions 5 March 10th 06 08:16 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 10:16 AM.

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"