Round up to next whole number

marathonlady

Registered User.
Local time
Yesterday, 21:57
Joined
Jul 10, 2002
Messages
120
In access2000 I need to round up to nearest whole number.
Here's an example: 1.00001 would be 2.

Anyone know how to do this?

Thanks.
 
Try this

Public Sub RoundUp()
Dim x
Dim y

x = 1.00001 ' Change to your ref

y = Int(x)
If y <> x Then
y = y + 1
End If

End Sub

HTH
John
 
MarathonLady:

Try this in the debug window:

x = 1
y = int(x+0.99999)
? y
1

x = 1.00001
y = int(x+0.99999)
? y
2

John-
Any locale named Sheepy Magna has got to have a great story behind it. Please share it.

Best wishes,

Bob
 
Ah yes I remember it well!!

Back in the ol' days when men were men and sheep were sheep, there was a notorious highway man who went by the name of Dick Turpin. Many a time did he hold people up and rob them on the roman road known as the A5. Once he had his bounty he would flee. One of his routes would take him to a small village called Sibson where he took shelter in the local pub, which is still there today and goes by the name of the **** Inn. There he would hide up the fire place, or down in the cellar ‘til all was safe. About 2 miles away was a little village called Sheepy Parva, so named because there were a few sheep in the surrounding fields (Parva litteral translation = small), next to this small sheep village was a slightly bigger village with BIGGER sheep and so was given the name Sheepy Magna. And to this day some say they can hear the clattering of horses hooves along the A444 as Dick wends his way from the Roman Road to his place of hiding....:eek:
 
Thanks John,

That was great! Led me to searching on Dick Turpin and Sheepy Magna, et al.

There's a whole lot of history out there. It was fascinating.

Thanks,

Bob
 

Users who are viewing this thread

Back
Top Bottom