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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tables-Rounding Decimals Up or Down 1

Status
Not open for further replies.

UberZoot

Technical User
May 31, 2003
29
0
0
US
Ladies and Gents,
Is there a way to format a table so that any number entered would appear rounded appropriately to .00, .25, .5, or .75? EG 1.19 = 1.25. Please help!

UberZoot
 
If you have Access 2000 or later, following is from Help:

ROUND
Rounds a number to a specified number of digits.

Syntax

ROUND(number,num_digits)

Number is the number you want to round.

Num_digits is the number of digits you want to round to. Negative rounds to the left of the decimal point; 0 (zero) rounds to the nearest integer.



If your version is older, this should work, courtesy of Tony Jollans:

Format(Number,"0.00")

If you need a numeric result, you could use Val to convert the string output of the Format function.



HTH,
Bob [morning]
 
Bob,
How exactly can I convert numbers entered (EG 1.04/1.21) to numbers required (EG 1.00/1.25)? Thanks again.

UZ
 
OOPS!

Sorry, I concentrated on rounding and overlooked making it to the nearest .25.

Try:

=Round(Number * 4 ,0)/4



HTH,
Bob [morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top