View Full Version : Rounding Formula
mbalsom
2006-03-14, 10:56 PM
Is there a formula or a way to round up (to nearest 300mm say)and not down. I would like to schedule stock lengths of structural members,as well as cut lengths.
aaronrumple
2006-03-14, 11:15 PM
Is there a formula or a way to round up (to nearest 300mm say)and not down. I would like to schedule stock lengths of structural members,as well as cut lengths.
There is no round function, but you can format the value to "round" to as many decimal places as you like. Look for Field Formatting on the Formatting Tab.
What this won't do is round 1.3 up to 2 to allow for waste.
mbalsom
2006-03-14, 11:31 PM
Tried feild formating but will round either way depending on increments and decimal places,not just in one direction (up). I would like to thiink V9 would have this function with new material take-off, so stock length $$ would be estimated.
beegee
2006-03-14, 11:37 PM
Uncheck the" Use Project Settings "box under the Formatting tab in the schedule, then select Custom and enter the rounding increment as 300.
This is a round up and round down as a factory pre-set. That means 10149.9 rounds to 10000 and 10150 rounds to 10300.
You could, however, get a bit tricky and build your own formula for rounding.
Use calculated fields for the following parameters ...
Length Integer = Length / 300 mm ( Type is Integer )
Length Check = Length / 300 mm ( Type is Number )
Test Cond = Length Check > Length Integer ( Type is Yes, No )
Length Schedule = If(Test Cond, Length Integer * 300 mm + 300 mm, Length Integer * 300 mm) ( Type is Length )
The resulting schedule is shown below. ( More difficult to explain than to do )
mbalsom
2006-03-14, 11:56 PM
Beegee thanks for the formula. I have tried Custom rounding before but rounds either way. It would be nice to choose which direction to round .
dbaldacchino
2006-03-15, 03:53 AM
Add 0.5 to your number before rounding to round up. Similarly, subtract 0.5 from your number before rounding to round down.
a) 9.3+0.5=9.8 which will be rounded to 10
b) 9.3-0.5=8.8 which will be rounded to 9
I use this for calculating my occupancy...I round up to be conservative.
jkrager
2006-03-15, 03:52 PM
Add 0.5 to your number before rounding to round up. Similarly, subtract 0.5 from your number before rounding to round down.
a) 9.3+0.5=9.8 which will be rounded to 10
b) 9.3-0.5=8.8 which will be rounded to 9
I use this for calculating my occupancy...I round up to be conservative.
Better to add 0.49 if you are just going up to the next whole number.
a) 9.3+0.49=9.79 which will be rounded to 10
b) 9.0+0.49=9.49 which will be rounded back to 9.0
unless instead you want that added cushion. Then use 0.5.
c) 9.0+0.5=9.5 which will be rounded to 10
dbaldacchino
2006-03-16, 02:44 PM
You're absolutely right. Good point :)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.