cash chest test new 10.1.16.xls | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | Currency | Pieces | Value | Result | Balance | ||||||||||
2 | 100 | 1047 | 104700 | 104700 | 0 | 7 | 1000 | 1500 | 1047 | 1047 | 0 | ||||
3 | 50 | 831 | 41550 | 41500 | 50 | 1 | 50 | 830 | 3000 | 2924 | 830 | 104700 | |||
4 | 20 | 124 | 2480 | 2400 | 80 | 4 | 80 | 120 | 7500 | 7430 | 120 | 146200 | |||
5 | 10 | 140 | 1400 | 1400 | 0 | 0 | 0 | 140 | 140 | 15000 | 15000 | 140 | 148600 | ||
6 | Total | 150130 | 150000 | 130 | 150000 | ||||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C2:C5 | C2 | =A2*B2 |
D2:D5 | D2 | =A2*L2 |
E2:E5 | E2 | =C2-D2 |
F2:F5 | F2 | =RIGHT(B2,1) |
J2 | J2 | =M6/100 |
K2:K5 | K2 | =M3/A2 |
L2 | L2 | =MIN(K2,IF(B2="",0,B2)) |
J3 | J3 | =M6/50 |
L3 | L3 | =MIN(K3,B3,I3) |
J4 | J4 | =M6/20 |
L4:L5 | L4 | =IF($G$5+(RIGHT($G$4,2)*1)=(RIGHT($G$3,3)*1),B4,MIN((M5/A4),I4,H4)) |
G3:G5 | G3 | =A3*F3 |
I2 | I2 | =FLOOR(B2,100) |
I3,I5 | I3 | =FLOOR(B3,2) |
H4 | H4 | =FLOOR(B4,5) |
H5 | H5 | =FLOOR(B5,10) |
J5 | J5 | =M6/10 |
C6:E6 | C6 | =SUM(C2:C5) |
M2:M5 | M2 | =M3-D2 |
M6 | M6 | =FLOOR(C6,50000) |
Hello everyone,
I hope everybody is keeping fine.
As shown in the table above, the value in column "Pieces" changes always. Whatever the total value or pieces be, what I have tried to do is round the value in column "Value". But the value in "D6" should be rounded to 50000 always.
I have tried my best to use my brain and formulas to do this. Is there anyone who could find an easier way to do this, either a formula or a macro?
Please try. Thanks in advance