Jump to content

Recommended Posts

Posted (edited)

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

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
×
×
  • Create New...