ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formating number to fix length (https://www.excelbanter.com/excel-programming/340202-formating-number-fix-length.html)

kai

Formating number to fix length
 
Hi, All
I have a number column, I want to format the numbers to length 6: For
example 456 change to 000456, 78 to 000078, 23456 to 023456. I tried to use
Format (A1,"######"), but it does not work. Please help how to use VBA to
format the column.

Thanks

kai



zzzzzzzzzz

Formating number to fix length
 
=TEXT(G22,"000000")

"kai" wrote:

Hi, All
I have a number column, I want to format the numbers to length 6: For
example 456 change to 000456, 78 to 000078, 23456 to 023456. I tried to use
Format (A1,"######"), but it does not work. Please help how to use VBA to
format the column.

Thanks

kai




Michael Malinsky[_2_]

Formating number to fix length
 
Format(A1, "000000")


kai

Formating number to fix length
 
Thanks, it works.

Kai
"zzzzzzzzzz" wrote in message
...
=TEXT(G22,"000000")

"kai" wrote:

Hi, All
I have a number column, I want to format the numbers to length 6: For
example 456 change to 000456, 78 to 000078, 23456 to 023456. I tried to
use
Format (A1,"######"), but it does not work. Please help how to use VBA to
format the column.

Thanks

kai






kai

Formating number to fix length
 
Thanks.

Kai
"Michael Malinsky" wrote in message
oups.com...
Format(A1, "000000")





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

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