Forum Discussion

JonnieMorgan's avatar
JonnieMorgan
Copper Contributor
Mar 28, 2022
Solved

Please help me find where this error is coming from.

 

Personal Finances Workbook.

Simple Transactions Table (Currency so 2 decimal digits)

No Interest Calcs or similar.

Formula to derive balance on the selected account is:-

=(SUMIFS(TrAmount,TrAccName,B4))

Not much room for error there!

After about 35 transactions to the account I am getting a figure which should be 0 of:-

-£0.000000000000028421709430404

 

Where is this coming from please?

I’m baffled!

Many thanks.

Jon

  • JonnieMorgan Google for "Floating point error" and just accept it. When you notice something like this wrap the formula in a ROUND function. So, in your case use:

     

    =ROUND(SUMIFS(TrAmount,TrAccName,B4),2)

     

2 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    JonnieMorgan Google for "Floating point error" and just accept it. When you notice something like this wrap the formula in a ROUND function. So, in your case use:

     

    =ROUND(SUMIFS(TrAmount,TrAccName,B4),2)

     

    • JonnieMorgan's avatar
      JonnieMorgan
      Copper Contributor
      Thank you!
      That's obvious now it's been explained to me!!
      Regards
      Jon