Forum Discussion

BuildPro's avatar
BuildPro
Qrew Captain
8 years ago

What is the formula to round up or down to the nearest ""5

Need a formula for the following:

If [gal to order] is between 17 & 22, round to 20
If [gal to order] is between 22.01 & 27, round to 25

etc...

4 Replies

  • I think your math is wrong. If you want to round to the nearest 5, Round(17,5) = 15 not 20.
  • No math involved. I want all numbers between 17 & 22 to round to the number 20. Some will round up, some will round down. Also, 22.01 through 27 would round to 25...so on and so forth. Thx
  • Round([gal to order]/5)*5

    To prevent returning a zero use with an if statement to handle values <2.5

    This will work with any desired multiple.