Rounding Down

J

J

I have a form where I need to have any number from 99.01 up to 99.99
rounded down to 99. This is done through a click event. It doesn't
matter about any number from 0-99 because this number represents a
completion status percentage and I just don't want a 99.6 appearing as
100% because the project would appear to be completed but would still
have work left to do. I was thinking about something like a nested IF
statement something like:

If FinalTotal > 99 Then
If FinalTotal < 100 Then
FinalTotal = 99
Forms![Status wk 01]![Completion Status] = Round(FinalTotal * 100,
" ")
Else
Forms![Status wk 01]![Completion Status] = 100
End If
End If

But apparently it doesn't seem to work correctly. I could use some
insight on other methods that could help solve my problem.
 
G

Guest

Use Int instead of Round. Int returns the Integer portion of the number, so
it has the same effect as forcing a round down.

Int(99.01) returns 99, and Int(99.999) also returns 99. Int(100) returns 100.

Try this: If FinalTotal > 99 Then FinalTotal = Int(FinalTotal)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top