Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Working with numbers in Excel-Specify # of digits

I have a range of numbers; some are 7 digits long, others, 8, 9 or 10 digits.
How can I tell Excel to put zeroes in front of the numbers that don't have
full ten digits? I want the result to be ten digits long for everything.
Excel 2003. Hopefully this is an easy one for most! Thanks for the help.
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default Working with numbers in Excel-Specify # of digits

Use a custom format of 0000000000

--


Regards,


Peo Sjoblom

"George" wrote in message
...
I have a range of numbers; some are 7 digits long, others, 8, 9 or 10
digits.
How can I tell Excel to put zeroes in front of the numbers that don't have
full ten digits? I want the result to be ten digits long for everything.
Excel 2003. Hopefully this is an easy one for most! Thanks for the help.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Working with numbers in Excel-Specify # of digits

Use a custom number format.

Select the cells in question
Goto the menu FormatCellsNumber tabCustom
Enter 10 zeros in the little box under TYPE:
0000000000
OK out

--
Biff
Microsoft Excel MVP


"George" wrote in message
...
I have a range of numbers; some are 7 digits long, others, 8, 9 or 10
digits.
How can I tell Excel to put zeroes in front of the numbers that don't have
full ten digits? I want the result to be ten digits long for everything.
Excel 2003. Hopefully this is an easy one for most! Thanks for the help.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Working with numbers in Excel-Specify # of digits

format cell as: 0000000000

or using formula

=TEXT(A1,"0000000000")


"George" wrote:

I have a range of numbers; some are 7 digits long, others, 8, 9 or 10 digits.
How can I tell Excel to put zeroes in front of the numbers that don't have
full ten digits? I want the result to be ten digits long for everything.
Excel 2003. Hopefully this is an easy one for most! Thanks for the help.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Working with numbers in Excel-Specify # of digits

Now I can't sort the data, taking into account the zeroes. Does my entire
list of numbers need to be formatted a special way to force the zeroes into
order? It seems that currently the sorting is reliant on actual numbers in
the cells. Thanks.

"T. Valko" wrote:

Use a custom number format.

Select the cells in question
Goto the menu FormatCellsNumber tabCustom
Enter 10 zeros in the little box under TYPE:
0000000000
OK out

--
Biff
Microsoft Excel MVP


"George" wrote in message
...
I have a range of numbers; some are 7 digits long, others, 8, 9 or 10
digits.
How can I tell Excel to put zeroes in front of the numbers that don't have
full ten digits? I want the result to be ten digits long for everything.
Excel 2003. Hopefully this is an easy one for most! Thanks for the help.




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Working with numbers in Excel-Specify # of digits

The formatting method of padding with leading zeros doesn't change the
underlying value of the cell. Formatting is for *display purposes only*.

If the cell contains 123 and the formatted display value is 000123 the true
underlying value of that cell is 123 so Excel is sorting based on 123 not
000123.

You'd have to convert the result to TEXT and then Excel should sort as you
want:

A1 = 123

=TEXT(A1,"0000000000")

Returns the TEXT string 0000000123

--
Biff
Microsoft Excel MVP


"George" wrote in message
...
Now I can't sort the data, taking into account the zeroes. Does my entire
list of numbers need to be formatted a special way to force the zeroes
into
order? It seems that currently the sorting is reliant on actual numbers
in
the cells. Thanks.

"T. Valko" wrote:

Use a custom number format.

Select the cells in question
Goto the menu FormatCellsNumber tabCustom
Enter 10 zeros in the little box under TYPE:
0000000000
OK out

--
Biff
Microsoft Excel MVP


"George" wrote in message
...
I have a range of numbers; some are 7 digits long, others, 8, 9 or 10
digits.
How can I tell Excel to put zeroes in front of the numbers that don't
have
full ten digits? I want the result to be ten digits long for
everything.
Excel 2003. Hopefully this is an easy one for most! Thanks for the
help.






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
Why does excel round off numbers greater than 16 digits? Dave Excel Discussion (Misc queries) 1 September 1st 07 08:25 PM
Why does excel turn numbers larger than 15 digits to zero? Aaron Excel Discussion (Misc queries) 5 December 15th 06 03:15 PM
How do I keep Excel from dropping my numbers to 0 after 15 digits Topmom5 Setting up and Configuration of Excel 1 May 19th 06 08:21 PM
in excel, how to limit digits of negative hexadecimal numbers? [email protected] Excel Discussion (Misc queries) 1 February 1st 06 11:36 PM


All times are GMT +1. The time now is 05:37 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"