Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Posts
    1

    Question Unanswered: vbscript decimal rounding

    How can I round up/down the decimal number to the nearest 5 or 10.
    For example:

    if the number is 23.43, the expected result is 23.45
    if the number is 23.42, the expected result is 23.40
    if the number is 23.98, the expected result is 24.00

    Please help!

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    nearest5 = round(20*yourValue)/20


    izy

Posting Permissions

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