dreimer Posted March 11, 2015 Share Posted March 11, 2015 (edited) I have some jobs that have differing quantities ordered. I can fit 1500 per box. I am trying to create a rule to determine how many cartons are needed for each order. So then my labels will say for example 1 of 1 or 1 of 2, etc. I used this rule but am not sure how to have no decimal places and round to the nearest whole number. return Round((Field("Total Qty")/1500),0) So for example one record will have 500 for the quantity but the rule returns .3 and will in turn return 0 but I want it to return 1. For order for 1000 it will return 1 since it is .6 and rounds up. Question: Is there syntax to round up for any fraction of a whole number? TIA Edited March 11, 2015 by dreimer Quote Link to comment Share on other sites More sharing options...
David Miller Posted March 11, 2015 Share Posted March 11, 2015 Suggest looking at this post here. It might help. Math.ceil rounds up, Math.floor rounds down and Math.round rounds to the nearest integer. Quote Link to comment Share on other sites More sharing options...
dreimer Posted March 11, 2015 Author Share Posted March 11, 2015 Sorry when I searched the forums I saw the title rounding to the nearest 5 so I didn't think it applied. Lesson learned, look at the thread anyway. Thanks this works perfectly. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.