Rounding problem

Chimp8471

Registered User.
Local time
Today, 08:23
Joined
Mar 18, 2003
Messages
353
I have searched through the forums for Rounding situations but not really found an easy way to do what i am aiming to achieve.

i have a report that once ran displays a two columns of data

Runtime
Occurances

what i have done is calculate runtime / Occurances to give me my MTBF (Mean Time Between Failures) figure

the trouble is that, the figures i get often have figures such as

431.75

or

431.35

i need these figures to be rounded up or down whichever the case should be.

so 431.75 would be 432

and

431.35 would be 431

please help

Andy
 
I thought you posted on Rounding last week. :confused:


The simplest solution (other than CInt() which rounds up or down accordingly except when the value is x.5)


Add 0.5 to your value and use the Int() function to determine.

ie. Int([YourValue]+0.5)

examples:

Int(431.75 + 0.5) => Int(432.25) => 432
Int(431.35 + 0.5) => Int(431.85) => 431
 
Your right i did, i am losing the plot here....sorry about that.....

I need a holiday

cheers again

Andy
 

Users who are viewing this thread

Back
Top Bottom