Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Jun 2004
    Location
    Gtr London, England
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Format Currency (Word 2003)

    Can anyone help ... please !!!

    I am working with currency variables and am using the FormatCurrency function to ensure that there is only two digits after the decimal point. The problem I am getting is for the currency variable/format currency is to register "0" as the second digit - I would like it to read 175.40 rather than 175.4.

    Any ideas?

    Many thanks
    Jack

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Format Currency (Word 2003)

    Will

    Format(longVariable, "Currency")

    work? If you don't want the $ sign, then

    Format(longVariable, "#,##0.00")
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    Star Lounger
    Join Date
    Jun 2004
    Location
    Gtr London, England
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format Currency (Word 2003)

    Thanks for your help John.

    Everything is working well, I hadn't realised that I needed to set the variable up as a string rather than a currency or long variable - it only only worked when I assigned the calculation to a string - doesn't make much sense to me but hey if it works I'm not going to complain.

    Regards
    Jack

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

    Re: Format Currency (Word 2003)

    A variable of type Currency is a number. Numbers are not stored with any kind of format, but as a series of 0s and 1s. So if you store an amount in a currency variable, you don't need to worry whether it is 175.4 or 175.40 or 175.4000, it is all the same to the computer. A format is used to display a number. If you need to work with the formatted result for some reason, you are actually working with a string, not with a number any more.

  5. #5
    Star Lounger
    Join Date
    Jun 2004
    Location
    Gtr London, England
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format Currency (Word 2003)

    Thanks Hans .... now I understand why it needs to be set up as a string.

    Regards
    Jack

Posting Permissions

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