Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a variable, dimensioned as Single, that I have in a loop doing this:
JETotal=Debit-Credit Debit and Credit are both also Dim'd as Single. The Code to accumulate cost is: JETotal = Round(JETotal + Debit - Credit, 2) But when done, the JETotal variable does NOT equal Zero. But if I go in the spreadsheet and sum the 2 columns and net them, I get Zero. How do I solve this problem? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What happens if everything is Dim'd Double (the worksheet defaults to double
precision). With numbers around 1E6, Single may not give 2-decimal place accuracy. Jerry "Mike H." wrote: I have a variable, dimensioned as Single, that I have in a loop doing this: JETotal=Debit-Credit Debit and Credit are both also Dim'd as Single. The Code to accumulate cost is: JETotal = Round(JETotal + Debit - Credit, 2) But when done, the JETotal variable does NOT equal Zero. But if I go in the spreadsheet and sum the 2 columns and net them, I get Zero. How do I solve this problem? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rounding Problem?? | Excel Discussion (Misc queries) | |||
Problem with rounding? | Excel Discussion (Misc queries) | |||
Rounding Problem | New Users to Excel | |||
Rounding Problem | Excel Worksheet Functions | |||
Rounding off problem..! | Excel Worksheet Functions |