How to change a decimal to whole number

  • 38
  • 1
  • Question
  • Updated 3 weeks ago
  • Answered
I have a number field labeled QTY. I have another field labeled Final totals that looks at the QTY field and divides by 2. But if its a decimal i need it to round up to a whole number.

For example: if QTY=7 the Finals Totals: 3.5. It should be 4 for the Final Totals.

Is this possible with a formula?
Photo of Mr Delemar

Mr Delemar

  • 112 Points 100 badge 2x thumb

Posted 3 weeks ago

  • 38
  • 1
Photo of zvi bock

zvi bock

  • 240 Points 100 badge 2x thumb
Just use the Round() function on the result
(Edited)
Photo of Mr Delemar

Mr Delemar

  • 112 Points 100 badge 2x thumb
Thanks, that work perfectly.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 27,694 Points 20k badge 2x thumb
Actually if you want to consistently round up you should use Ceil([Qty]/2) as Round([Qty]/2) rounds to the nearest integer. Round([Qty]/2) appears to work only because your [Qty] in an integer.
(Edited)