Round up and down

  • Thread starter Thread starter Gary Dolliver
  • Start date Start date
G

Gary Dolliver

Hi all,
I am trying to create the number of packages to be shipped based on the
total number of items that are shipping, and breaking them into bundles of
25. Therefore, 1-25 items would be 1 package, 26-50 would be 2 packages,
51-75 would be 3, and so on. How would I be able to have it round both up
and down depending on where the total items are at? Currently, it is
rounding down:
packages: Int([Qty]/25)
For example, if I have a Qty of 51, it gives me 2, where it should be 3.
Help is appreciated, thanks
-gary
 
Thank you Allen!

Allen Browne said:
Try:
- Int( - [Qty] / 25)

For an explanation, see:
Rounding in Access - Rounding Up
at:
http://allenbrowne.com/round.html#RoundUp

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Gary Dolliver said:
Hi all,
I am trying to create the number of packages to be shipped based on the
total number of items that are shipping, and breaking them into bundles of
25. Therefore, 1-25 items would be 1 package, 26-50 would be 2 packages,
51-75 would be 3, and so on. How would I be able to have it round both up
and down depending on where the total items are at? Currently, it is
rounding down:
packages: Int([Qty]/25)
For example, if I have a Qty of 51, it gives me 2, where it should be 3.
Help is appreciated, thanks
-gary
 
Back
Top