Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding up

Status
Not open for further replies.

ozzroo

Technical User
Feb 28, 2003
182
AU
Hi there

I am having trouble using rounding up to the nearest 5.

I have a query which calculates the .5% stamp duty on a cheque amount.

So a cheque for £1200 pays £6 stamp duty.

My calculation in the query for rounding up is

RoundedSD: (([StampDuty]+4)\5)*5

Which gives me £10 stamp duty on a £1200 cheque. That is correct.

However, on a cheque for £55000, the should be £275 stamp duty. But my calculation above gives me £280. (275+4 = 279 - rounded to 275.

How do i get it so if its on a multiple of 5, it stays at that amount
 
have you thought about using the round function?

in access it can only do decimals, so divide your figure by 10, round it, and then multiply by 10

--------------------
Procrastinate Now!
 
Any idea how i would convert the above calculation into a round function

havent used that function that much, so dont know how to write it in a query
 
search these fora (Tek-Tips) for basRoundTo (maybe basRound2?) anyway, something similar to basRound ...



MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top