Results 1 to 3 of 3

Thread: Select ceiling figure in Rounding method

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Location
    Malaysia
    Posts
    69
    Is there a function that return the ceiling value from a decimal value. The Round function in VB will round it to its closest value (which is not what i want). Thanks.

  2. #2
    Guest
    What do you mean by ceiling value? You could use the CInt Function to round a number.

    Code:
    Mynum = 475.413
    NyNewNum = CInt(Mynum)
    MsgBox(MyNewNum)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Location
    Malaysia
    Posts
    69
    What I want is -

    val = 4.1

    after process -
    val = 5


    Using the round function or cint will make 4.1 become 4 but what I want is if the 4 value is pass, no matter after 4.5 or before, I want to figure to become 5.

Posting Permissions

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



Click Here to Expand Forum to Full Width