Rounding UP


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Rounding UP

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Rounding UP

    [Originally posted by Chris Murphy]

    How would I always round a number UP?

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Rounding UP

    [Originally posted by Andrew Chin]

    Function RoundUP (Number As Double) As Double

    dec = Int(Number)
    If dec = Number Then RoundUP = Number Else _
    RoundUP = dec + 1

    End Function

    RoundUP (5.00) = 5.00
    RoundUP (5.25) = 6.00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center