View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Connie Martin Connie Martin is offline
external usenet poster
 
Posts: 251
Default Adding a zero to the front of numbers

This works, too! Thank you! I think the solution given by Per Jessen is
quicker, although I DID ask for a formula....only because I thought that was
the only way to go. Thank you so much. I'm printing this one, too, because
this one may suit better in another spreadsheet. Connie

"Domenic" wrote:

In article ,
Connie Martin wrote:

I have a column of numbers, over 800 rows. Some numbers are 7 digits and
some are 6 digits. I need a zero at the beginning of all the numbers with 6
digits. I have formatted the column to text so that I can do this because
it's not important that this column be recognized in number format. However,
is there a formula I could use to drag down the entire column that would pick
out all the numbers with 6 digits and throw a zero at the beginning of the
number? I'd hate to have to do this manually! Thank you. Connie



Assuming that A2:A800 contains the data, try...

B2, copied down:

=TEXT(A2,"0000000")

Then, to delete Column A, try the following...

1) Select Column B

2) Edit Copy

3) Edit Paste Special Values Ok

4) Format Column B as 'Text'

5) Delete Column A


--
Domenic
http://www.xl-central.com