Cash Denomination Calc returning incorrect values

rcarmichael

New Member
Joined
Aug 10, 2012
Messages
29
Office Version
  1. 2016
Platform
  1. Windows
Hello,
I am creating a calculator to make cashup of our drawer easier at the end of the day; the premise is that when we cash up there should be only $800 left in the drawer, and the largest denominations should be removed first in order to make that happen (JENI).
I am currently using
Excel Formula:
INT(($D$2-SUMPRODUCT($A$2:$A2,F$2:F2))/$A3
which works 85% of the time, but as you can see from my demo on Google Drive it sometimes returns the incorrect value (that is, the sum of the money to be removed and kept does not match what it should).
Does anyone have any idea why this would be? Any assistance is greatly appreciated.
Ryan
 

Attachments

  • DEMO.png
    DEMO.png
    18 KB · Views: 57

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
F3: =MIN(B3,INT(ROUND($D$2-SUMPRODUCT($A$2:$A2,F$2:F2),2)/$A3))

(to avoid floating point rounding error)
 
Upvote 0
Solution
Edit the coins I included 0.25

T1104b.xlsm
ABCDEFGHIJKLMNO
2TotalDrawerAmount$100$50$20$10$5$2$1$0.50$0.25$0.10$0.05$0.01
32,073.35800.001,273.351211001101100
1bb
Cell Formulas
RangeFormula
C3C3=A3-B3
D3D3=INT($C3/D$2)
E3:O3E3=INT(ROUND($C3-SUMPRODUCT($D3:D3,$D$2:D$2),2)/E$2)
 
Upvote 0
"Where I'm from (Australia) we don't have 25c and 1c coin"
That is why I said Edit the coins; I noticed that after I posted the suggestion!
A post with XL2BB is much better than an image.
Your profile doesn't show Australia. Your profile could be updated to show Excel version.

Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top