A1VBCode Forums

Function Rounddown in excel how above in vb


http://www.a1vbcode.com/vbforums/Topic30919.aspx

By zikri_aushaf@yahoo.co.id - 11/15/2011

Hello

How to Rounddown Example 1.250.525 rounddown to 1.250.000, if in excel it can automatically

but how above in vb please tell me

Thank's

By macroman - 12/20/2011

The Int or Fix functions will do that.

debug.Print int(1250.525)
 1250

debug.Print fix(1250.525)
 1250

fix will convert positive or negative numbers toward zero; int will convert downward only.

debug.Print fix(-1250.525)
-1250

debug.Print int(-1250.525)
-1251