ROUNDUP to 9s

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do you ROUNDUP to 9s?

..94 to .99
1.08 to 1.09
2.41 to 2.49

Like you would in excell
=ROUNDUP(A1+0.01,1)-0.01
 
Hi Kevin,

Here might be a couple of ways:

-- A1 is always positive (can be Null)

int(float*10)/10 +.09

-- A1 is always non-null, positive or negative:

Fix(A1*10)/10 + (Sgn(A1)*.09)

--

IIF(A1 IS NULL, NULL,
Fix(A1*10)/10 + (Sgn(A1)*.09))

good luck,

gary
 
Thanks for your help on this one.

Also, how do you ROUNDUP to 10ths (2 decimals)?

..943 to .95
1.081 to 1.09
2.417 to 2.42

Like you would in excell
=ROUNDUP(A1,2)
 
Assuming all numbers are positive, you should be able to use something like

-Int(-[YourNumber]*100)/100

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Thanks!


John Spencer said:
Assuming all numbers are positive, you should be able to use something like

-Int(-[YourNumber]*100)/100

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top