Next highest whole number

K

klp

How would I take a value from a calculation and adjust it to be the next
highest whole number?

For example:

20 * 8.888 = 177.776 / 4 = 44.444

The 44.444 needs to be to the next highest whole number. So then I can take
the 44.444 which would be 45 and multiply that by my next part of the
calculation to get a whole number no decimals.

Make sense?

Thanks in advance.
Kim
 
K

klp via AccessMonster.com

I guess I didn't make myself very clear. I know about the round function but
that's not exactly what I'm looking for. In looking through some functions, I
found the int function. I need to to round to the nearest whole integer. So
if I had a range of numbers from 44.100 - 44.999 then I would want it to go
to 45 regardless of decimal.


Look in Access Help for the Round() function

jmonty
How would I take a value from a calculation and adjust it to be the next
highest whole number?
[quoted text clipped - 11 lines]
Thanks in advance.
Kim
 
C

Charles E. Vopicka

just write a function to do this. it would be easy.

if int(yourval) <> yourval then yourval = int(yourval)+1

I guess I didn't make myself very clear. I know about the round function but
that's not exactly what I'm looking for. In looking through some functions, I
found the int function. I need to to round to the nearest whole integer. So
if I had a range of numbers from 44.100 - 44.999 then I would want it to go
to 45 regardless of decimal.


Look in Access Help for the Round() function

jmonty
How would I take a value from a calculation and adjust it to be the next
highest whole number?
[quoted text clipped - 11 lines]
Thanks in advance.
Kim


--
Charles E. Vopicka's (Chuck) : [email protected]

Database Management, GIS Specialist and Research Assistant

Forest Biometrics Research Institute
University of Montana - College of Forestry and Conservation
Missoula, MT 59812
United States of America

Phone:
(406)243-4526
(406)243-4264
(406)549-0647 (Home)

:) HAVE A NICE DAY (-:

"UNLESS" (The Lorax, by Dr. Seuss)
 
J

jmonty

Try this instead:
http://support.microsoft.com/?kbid=209996


jmonty


klp via AccessMonster.com said:
I guess I didn't make myself very clear. I know about the round function but
that's not exactly what I'm looking for. In looking through some functions, I
found the int function. I need to to round to the nearest whole integer. So
if I had a range of numbers from 44.100 - 44.999 then I would want it to go
to 45 regardless of decimal.


Look in Access Help for the Round() function

jmonty
How would I take a value from a calculation and adjust it to be the next
highest whole number?
[quoted text clipped - 11 lines]
Thanks in advance.
Kim
 
T

Tom Lake

klp via AccessMonster.com said:
I guess I didn't make myself very clear. I know about the round function
but
that's not exactly what I'm looking for. In looking through some
functions, I
found the int function. I need to to round to the nearest whole integer.
So
if I had a range of numbers from 44.100 - 44.999 then I would want it to
go
to 45 regardless of decimal.

45 ISN'T the nearest whole integer to 44.100. 44 is. To actually round
to the nearest integer, use

Int(n + .5) where n is a non-negative number.

Tom Lake
 
K

Klatuu

First, read the header Next HIGHEST Number
Next, if you use his example of 44.444 wanting it to be 45 (Next HIGHEST
number),

Int(44.444 + .5) returns 44
 
Top