Excel Data Manipulation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gabriel LAM
    New Member
    • Sep 2010
    • 1

    Excel Data Manipulation

    I wish to change numeric values in Excel cells into text of fixed field length, e.g. numeric value of 10 to export into a text file as "00010" of numeric value of 100 as "00100". Can anyone advise? Thanks
  • MikeTheBike
    Recognized Expert Contributor
    • Jun 2007
    • 640

    #2
    Hi

    Could could try using a custom form at "00000" to displace the required leading zeros and see if that exports as required, if not you coud try formatting as text and adding leading zeros (not sure if this is practical. If that doesn't work then you need to write some code to do either the "text" formating suggested above, or to do the exporting and formationg it as you exported.

    Unless anybody has some other ideas!?

    MTB

    Comment

    • Peternel

      #3
      Use function :

      =text(10;"00000 ")

      Comment

      • Guido Geurs
        Recognized Expert Contributor
        • Oct 2009
        • 767

        #4
        Yes, I think this will do it = Format(Range("A 1"), "00000") ?

        Comment

        Working...