By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,504 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,504 IT Pros & Developers. It's quick & easy.

Rounding Up in VB Script

P: 1
I am trying to round-up in VBscript but am hitting blanks...

My script so far is...

Value = Quantity / Packing
Value = Int(value + 0.8)

Quantity and Packing are variables and always needs to round up

Please help?
Aug 2 '10 #1
Share this Question
Share on Google+
1 Reply


Joseph Martell
Expert 100+
P: 196
Interesting article on rounding in VB Script here. To answer your question, and to quote from the referenced article, I think you could use the Fix function. It will always round down (closer to 0) by truncating the decimal portion. If you add 1 to the result of Fix (assuming a positive argument), then you have your numbers rounded up.
Aug 2 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.