Forum Discussion

kattlees's avatar
kattlees
Icon for Post Patron rankPost Patron
8 years ago
Solved

Round to nearest $5

I'm trying to round to the nearest $5.

 

HPayRoundUp = ROUNDUP([HPay],-0.5)

 

It takes 22.45 and is rounding to 30.

 

If I go any lower (-0.2) it goes to 23

  • Hi kattlees,

     

    Then you can a formula like this :

     

    HPayRoundUp = (INT([HPay]/5)+1)*5

    and if you have negative number then you will adapt it...

     

    Ninter

6 Replies

  • Hi kattlees,

     

    Did you try the Mround function?

     

    Let us know if you tried and did not work, then give few examples with expected results and we will figure out.

     

    Thank you.

     

    Ninter

    • kattlees's avatar
      kattlees
      Icon for Post Patron rankPost Patron

      Yes, HPayRoundUp = MROUND([HPay],5) rounds down so 22.45 becomes 20

      • Interkoubess's avatar
        Interkoubess
        Icon for Solution Sage rankSolution Sage

        Hi kattlees,

         

        So for example 22.45 you want 30, and what about 16.45, 18.56 or 27.64?

         

        Thank you.

         

        Ninter