Results 1 to 2 of 2

VB code to show 3 decimal places

This is a discussion on VB code to show 3 decimal places within the Excel Questions forums, part of the Question Forums category; What is the code in order to show up to 3 decimal places in a varible. ie. for a value ...

  1. #1
    Board Regular
    Join Date
    Oct 2006
    Posts
    337

    Default VB code to show 3 decimal places

    What is the code in order to show up to 3 decimal places in a varible.

    ie. for a value of 1.010

    show it as 1.010 and not 1.01

    Thanks

  2. #2
    MrExcel MVP erik.van.geit's Avatar
    Join Date
    Feb 2003
    Location
    Belgium 3272 Testelt
    Posts
    17,765

    Default

    Hi,

    have a look at FORMAT in the VBAhelp
    Code:
    MsgBox Format(1.01, "#.000")
    kind regards,
    Erik

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com