View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff[_2_] Harald Staff[_2_] is offline
external usenet poster
 
Posts: 449
Default RoundDown function not working in code

"Harald Staff" wrote in message
...
-0.775 to -0-780 is down, isn't it?

Best wishes Harald


"Don G" wrote in message
...
I'm using Excel 2003 VBA. In the immediate window I enter

? application.rounddown(-0.775,2) and it gives the result -0.77

In the following code

'Deal with SHEETCREDIT
SheetCredit = CashIn - CashDue
'dealing with negative sheetcredit
If SheetCredit < 0 Then SheetCredit =
Application.RoundDown(SheetCredit, 2)
'display this on the form
SheetsForm.DriverCreditBox.Value = Format(SheetCredit, "currency")

SheetCredit is -0.775 and the result is -0.78 Any idea why?