View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
yshridhar yshridhar is offline
external usenet poster
 
Posts: 229
Default Need help with coding

Hi anna
Taking A1 = amount ($2085) b1= 100, c1 = 50, d1 = 20, e1=10, f1 = 5
B2 (100's) = QUOTIENT(A1,100)
c2 (50's) =FLOOR(($A$1-$B$2*$B$1)/C1,1)
D2 (20's) =FLOOR(($A$1-($B$2*$B$1+$C$2*$C$1))/D1,1)
E2 (10's)=FLOOR(($A$1-($B$2*$B$1+$C$2*$C$1+$D$2*$D$1))/E1,1)
F2 (5's) =FLOOR(($A$1-($B$2*$B$1+$C$2*$C$1+$D$2*$D$1+$E$2*$E$1))/F1,1)
If you want to extend the formula you have to add the other denominations.
Best wishes
Sreedhar

"anna" wrote:

I work for the company where we still pay the cash wages, before I go to the
bank I Have to work out what how many hundreds fifties and so on to get ,I
set up on a spreadsheet
where I put the amount earn for example $2085 dollars and at this stage I
put manually how may hundreds ,fifties ,twenties ,tens and fives goes into
that sum is there a code so it can automatically do this for me in excel 2003
Can anyone help Thank you in advance

$100 $50 $20 $10 $5
$2,085 20 1 1 1 1
$1,975 19 1 1 1
$2,135