Jump to content
Daryl Wood

Rounding formula

Recommended Posts

Does anyone have a formula for rounding up a real number to the next higher integer? I'm trying to get a length in dimensional feet and inches to round up to the next whole foot when the fractional part is less than 6". I want 12'4" to round up to 13'.

Any ideas are appreciated.

Share this post


Link to post

I'm a lumberjack and I'm okay...

Rounding to the next higher arbitrary number (eg. lumberyard lengths) is an interesting junior high-school mathematical exercise. Rounding upwards in a set measurement scheme much less so. Just add a unit and round down.

Or, in Daryl's case, if the remainder of the modulus is less than half the unit, then add etc. but then you don't get lumberyard lengths.

Share this post


Link to post

Peter, yes, in part. I would like a list of joists rounded up to the nearest whole foot because rounding down is a bad thing. By rounding up I would have a framing schedule that tells carpenters to go to the material stack and get 8- 35' joists, not 8- 34'3 3/8" joists. The lumber yard will cut up to the next higher foot.

This function would be used for other members as well.

I sometimes have say 6 joists in a framed bay area where a couple of them lie in the 45 degree angles. I want to have all of them ID'd the same and with the length be rounded up to the nearest whole foot.

Share this post


Link to post

=12.75 DIV 1+1 will return 13 in a worksheet cell.

DIV returns the quotient...throws away the fraction. It needs to be separated by spaces.

=12.75 DIV 2+1 will return 7

Hope that works for you

Charles

Share this post


Link to post

Daryl

I've used the formula preceded by ROUNDDOWN or ROUNDUP in excel.

Haven't tried it in a VW worksheet but would expect there is something similar.

Share this post


Link to post

Hi Grant, yes I tried the excel functions just for kicks and could not make them work. Are you the same Grant Marshall that I see on the Sketchup forum occasionally? Welcome.

Share this post


Link to post

Hi Daryl. No I don't frequent the sketchup forum. I haven't had the time to explore sketchup in any great detail unfortunately.

Cheers, Grant

Share this post


Link to post

for archival sake, the answer here is to use the forumula =ROUNDUP(('lumber'.'length'),0) and make sure your column is set to display numbers as Dimensions.  Whole feet is easy.  Rounding to whole inches is more difficult in a feet-and-inches Units setup, as I'm finding.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×