Donate SIGN UP

Formula in Access.

Avatar Image
pretty_snowdrop | 19:43 Mon 12th Mar 2012 | ChatterBank
8 Answers
Does anyone know how to round up in Access? Eg so 25.4 will round up to 26 and not default to 25.
Sorry i realise it's not really a topic for chatterbank but i didn't know where else to put it and i need a solution asap.
Thanks x
Gravatar

Answers

1 to 8 of 8rss feed

Best Answer

No best answer has yet been selected by pretty_snowdrop. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
I'm not sure why you would want to round up 25.4 to 26, but can you clarify the rule of rounding you want- anything above a whole number (eg 25.00001) to round up to the next whole number?
In Excel under functions there is a RoundUp function. Does that exist in Access too?
Question Author
Thanks factor30 for your replies. It is actually OH who needs a solution. He says he needs anything above a whole number rounding up, so 25.00001 needs roundingup to 26. He knows how to do it in excel but can't get it to work in access.
Try this in your query:

Round([Fieldname]+0.5,0)

Adding 0.5 to your value ensures the value is always greater than x.5. Setting the decimal place value to zero returns an integer.
Question Author
Thanks for your help New Judge. The formula has worked perfectly.
Glad to help.

Sorry, my explanation was not quite correct. The “Round” function in Access rounds down or up to the nearest whole number (1.1 returns 1; 1.9 returns 2). To always round up, if you add 0.5 to your original value 1.1 becomes 1.6 which Access will round to up to 2. 1.9 becomes 2.4 which Access rounds down to 2.

Simples !!!
I'm afraid the very title of the question had me lost. Think I've been leading a sheltered life.
MS-Access is part of the MS-Office suite, parkdale. It is a database package which facilitates manipulation and analysis of data. As part of that manipulation/analysis the user can construct formulae (similar to those used in Excel) to modify the data. Its use is not as common as Excel and some of its principles are a bit difficult to grasp if you're only used to spreadsheets.

1 to 8 of 8rss feed

Do you know the answer?

Formula in Access.

Answer Question >>