Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
kai kai is offline
external usenet poster
 
Posts: 5
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
kai kai is offline
external usenet poster
 
Posts: 5
Default 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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Formating number to fix length

Format(A1, "000000")

  #5   Report Post  
Posted to microsoft.public.excel.programming
kai kai is offline
external usenet poster
 
Posts: 5
Default Formating number to fix length

Thanks.

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





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
length principle of a number within a cell German Mandujano Medina Excel Discussion (Misc queries) 1 August 18th 08 08:52 PM
Maximum length of a number Pé Excel Worksheet Functions 1 October 31st 06 11:42 AM
calculate the number of words in a row whose length is greater than 2 sks1379 Excel Worksheet Functions 5 September 4th 05 06:21 PM
Need to fix the number filed so all numbers are 8 in length TechGuyatwork Excel Programming 2 June 17th 05 05:06 AM
Number length headache Chad[_10_] Excel Programming 2 June 15th 04 10:25 PM


All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"