locked
Round function is rounding down the numbers RRS feed

  • Question

  • hi

    i have a number like 182.5 and i used round function like this

    Round(([totals].[mark]+[totals2].[mark])/2)

    then i get 182 but what if i want to get 183 what should i type ?

    thanks

    Monday, July 3, 2017 12:19 PM

Answers

  • The Round function in Access rounds numbers ending in .5 to the nearest even number:

    181.5 and 182.5 become 182

    183.5 and 184.5 become 184

    etc.

    You can use

    Int(([totals].[mark]+[totals2].[mark])/2+0.5)

    to always round numbers ending in .5 upwards.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by moaaz-96 Monday, July 3, 2017 10:31 PM
    Monday, July 3, 2017 3:25 PM

All replies

  • The Round function in Access rounds numbers ending in .5 to the nearest even number:

    181.5 and 182.5 become 182

    183.5 and 184.5 become 184

    etc.

    You can use

    Int(([totals].[mark]+[totals2].[mark])/2+0.5)

    to always round numbers ending in .5 upwards.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by moaaz-96 Monday, July 3, 2017 10:31 PM
    Monday, July 3, 2017 3:25 PM
  • Thank you very much :D
    Monday, July 3, 2017 10:32 PM