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

    Format number (2000 sr 1)

    how to format this column in #00000 (the column into sheet is TEXT format)

    wksList.Cells(lRow, 7).Value = wksQuery.Range("C5").Value 'Cap

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

    Re: Format number (2000 sr 1)

    Can you give an example of what wksQuery.Range("C5") might contain?

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

    Re: Format number (2000 sr 1)

    ahhhhhhh.... Sorry Hans and good morning... (Code for the longue)
    See wat my friends have make (for annoing problem to no insert link into history list in IE) and refer to te format number:

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

    Re: Format number (2000 sr 1)

    Thanks for the code, but I repeat my question: Can you give an example of what wksQuery.Range("C5") might contain?

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

    Re: Format number (2000 sr 1)

    is possible (and it can contain only max 5 cahracters):

    00
    00145
    010

    and i would want:

    00000
    00145
    01000

    Note: wath you think about the code posted?

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

    Re: Format number (2000 sr 1)

    Why should 010 change to 01000?

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

    Re: Format number (2000 sr 1)

    is a postal code... required 5 character
    i have solved this problem on your macro with:
    note: not consider UCASE (is experiment)

    Range("G" & lngRow) = Format(UCase(.document.all.tags("table").Item(1).R ows(4).Cells(1).innerText), "#00000")

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

    Re: Format number (2000 sr 1)

    You could use

    wksList.Cells(lRow, 7).Value = Format(wksQuery.Range("C5").Value, "#00000")

    but it will change 010 to 00010, not to 01000. Do you always want to add zeros after the value instead of before?

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

    Re: Format number (2000 sr 1)

    .... accccccccc.
    sorry, just 010 00010.
    Yes your modify is correct!
    You read in my mind, also;-) and translate in correct mode my terrible english.
    BIG Hans!

Posting Permissions

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