Rounding Issue

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

This formula below returns 16
I need it to return 17
In other words I want it to round up instead of down
Any suggestions appreciated.
Thanks
DS

=Round([Text0]*0.0825,2)
 
Int() always rounds down. You can use that to round up by negating the
number, using Int(), and negating the result.

Try:
= - Int( - [Text0] * 0.0825)
 
Allen said:
Int() always rounds down. You can use that to round up by negating the
number, using Int(), and negating the result.

Try:
= - Int( - [Text0] * 0.0825)
Didn't work. It gave an answer of 1.00 where text0 = 2.00
The correct answer should have been .17
Thanks
DS
 
You could try
Int((([Text0]*.0825)+.005)*100)/100



DS said:
Allen said:
Int() always rounds down. You can use that to round up by negating the
number, using Int(), and negating the result.

Try:
= - Int( - [Text0] * 0.0825)
Didn't work. It gave an answer of 1.00 where text0 = 2.00
The correct answer should have been .17
Thanks
DS
 
LGC said:
-(int(-round("2"*8.25,2)))/100

LGC
Thanks, I just tried it. Didn't work but this did.

Function Dollars(Amount)
Dollars = Int(Amount * 100 + 0.5) / 100
End Function

Thank you everyone for your input.
DS
 
Jackie said:
You could try
Int((([Text0]*.0825)+.005)*100)/100



:

Allen said:
Int() always rounds down. You can use that to round up by negating the
number, using Int(), and negating the result.

Try:
= - Int( - [Text0] * 0.0825)

Didn't work. It gave an answer of 1.00 where text0 = 2.00
The correct answer should have been .17
Thanks
DS
It Works! Thank You. This also works

Function Dollars(Amount)
Dollars = Int(Amount * 100 + 0.5) / 100
End Function

Thanks,
DS
 

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

Do not round percentage 1
Round up number 2
rounding problem 7
Round Function 3
Rounding up! 2
Filling a text box on a form with VBA code 4
Bankers Rounding 1
Rounding issue 6

Back
Top