ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   No decimals and leading zeroes (https://www.excelbanter.com/excel-discussion-misc-queries/22403-no-decimals-leading-zeroes.html)

gcotterl

No decimals and leading zeroes
 
In MICROSOFT EXCEL 2000, how do I change:
.12
156.00
5,678.99
10.12

to:
000000012
000015600
000567899
000001012

(without decimals and with leading zeroes).

Peo Sjoblom

Put 100 in an empty cell and copy it, select the range and do edit paste
special and select multiply
custom format cells as 000000000
if you need to export, insert an adjacent column, use a help formula

=TEXT(A1*100,"000000000")

where A1 is the first cell, copy down as long as needed
select and copy and paste special as values in place, remove the original if
needed
the latter is a method if you need to export these values and retain the
leading zeros

--
Regards,

Peo Sjoblom


"gcotterl" wrote in message
...
In MICROSOFT EXCEL 2000, how do I change:
.12
156.00
5,678.99
10.12

to:
000000012
000015600
000567899
000001012

(without decimals and with leading zeroes).




Max

Try this ..

Enter in an empty cell: 100, and copy the cell

Select and right-click on the target range
Choose Paste special Multiply OK

With the target range still selected
click Format Cells Custom
Enter in the "Type:" box: 000000000
(Enter 9 zeros)
Click OK

Perhaps another alternative to play around with,
if *text* results are acceptable

Assume the target range of numbers is in A1:A4

Put in B1: =TEXT(A1*100,"000000000")
Copy down to B4

B1:B4 will return the results indicated, but in *text* format.
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"gcotterl" wrote in message
...
In MICROSOFT EXCEL 2000, how do I change:
.12
156.00
5,678.99
10.12

to:
000000012
000015600
000567899
000001012

(without decimals and with leading zeroes).





All times are GMT +1. The time now is 06:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com