Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    format number in column (2000)

    have a column formated "General" and a var test dimensioned String.
    How to write in the column the value #00?
    Example:
    test=1 i want to write in column 01

    I have used the format #00 but the code write always 1

    sheets("mysheet").range("h"&count)=format(test,"#0 0")

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: format number in column (2000)

    Since the number format is General, Excel will not display leading zeros. Set the number format for the column to 00, and change the code to

    Sheets("mysheet").Range("H"&count) = test

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: format number in column (2000)

    GOOD!
    Tks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •