Jump to content

Rounding down


Recommended Posts

Nothing big, but I want to round down no matter what the number is after the decimal point. As it is, I'm just stripping everything after the decimal, but I would prefer coding a little tighter and I believe I can get it within stringformat but I don't know how. Here is what I've tried so far, but only the third is giving me what I want.

MsgBox(0,0,StringFormat( "%.0f",123.63576875665))
MsgBox(0,0,Round(123.63576875665))


MsgBox(0,0,StringLeft(123.63576875665,StringInStr(123.63576875665,".")-1))
Edited by Champak
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...