Inserting a "0"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
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 Special>Values back over
the original.
 
Hello

Many thanks for that.

it works a treat.

Edward said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top