Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Rounding math to increments of 10

Featured Replies

I have a database for my cabinet shop that calculates dimensions.

Cabinet box depth is a function how deep the countertops are, minus countertop overhang.

Drawer box depth is a function of cabinet box depth minus 6 millimeters.

If the cabinet box depth is 574mm then the drawer box depth is 568mm.

I would like to always constrain drawer box depth to increments of 10mm with rounding always going to the next smallest increment of 10.

For example:

568 mm would become 560mm

552 mm would become 550mm etc.

How would I go about rounding the result so that it always expressed as an increment of 10?

  • Author

Thank you Vaughan for the tip about TRUNCATE Function.

I was not aware of that one.

What I am trying to do is not necessarily control how many digits are displayed but rather control the rounding in a very specific manner.

I make use of the ROUND function all the time when converting imperial inches to millimeters.

What I would like to do now is to always make the resulting number display in a unit of 10.

For example: 562 is hard to find on a tablesaw vernier but 560 is easy. Tape rules tend to display units of 10.

In a perfect world:

562 would always default to 560.

568 would default to 570.

The significant part is that the resulting value be some decimal increment, i.e, ending with a (0).

Any ideas how to do this kind of rounding?

568 mm would become 560mm

552 mm would become 550mm

Truncate ( n ; - 1 ) would do that.

562 would always default to 560.

568 would default to 570.

Round ( n ; - 1 ) would do that.

---

P.S. The Truncate() function does NOT "control how many digits are displayed" - it calculates a new number.

Edited by comment

  • Author

Thanks guys! That is just what I needed.

(don't know how it works but it sure seems to)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.