View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default Need formula: too complexe for me..

Hi George

It's the same problem with rounding, as before, and explained very well
by Jerry as being due to the fact that decimal fractions have to be
approximated.

Amend the relevant formula to =Round(the_Formula,2)

--
Regards

Roger Govier


"George" wrote in message
.. .
Thank you,
I have entered the formula, it works fine.
But I have found a small glitch. in some cases next day transfer is a
penny
more.
George.

"Roger Govier" wrote in message
...
Hi George

Now that I can see your file, the solution is different to that which
I posted, and easier.

In cell K21 enter
=MIN(E14,INT(($G$27-SUM($M22:$M$31))/I21))
Copy down to cell K28
In cell K29
=INT(($G$27-SUM(M30:M31))/I29)
Leave cells K30 and K31 as they are currently with =E23 and =E24
respectively
(Incidentally, you don't need all those Plus signs in front of cell
values e.g. =+E23, they are a legacy from the days of Lotus 123)


--
Regards

Roger Govier


"George" wrote in message
...
Hi,
Sorry. In original post I made typing error in link, below the
proper link
http://www.savefile.com/files/58143
Thaks again
George.





"Gary''s Student" wrote in
message ...
I can't get to you files, but:

at the end of the day

put the number of hundreds in A1
the number of fifties in A2
the number of twenties in A3
the number of tens in A4
the number of fives in A5
the number of ones in A6

then run this macro:

Sub gsnu()
talley = 0

hundreds = Range("A1").Value
fifties = Range("A2").Value
twenties = Range("A3").Value
tens = Range("A4").Value
fives = Range("A5").Value
ones = Range("A6").Value

p1 = 0
p5 = 0
p10 = 0
p20 = 0
p50 = 0
p100 = 0

total = 100 * hundreds + 50 * fifties + 20 * twenties
total = total + 10 * tens + 5 * fives + ones

MsgBox (total)


For i = 1 To ones
talley = talley + 1
p1 = p1 + 1
If talley = 200 Then GoTo done
Next

For i = 1 To fives
talley = talley + 5
p5 = p5 + 1
If talley = 200 Then GoTo done
Next

For i = 1 To tens
talley = talley + 10
p10 = p10 + 1
If talley = 200 Then GoTo done
Next

For i = 1 To twenties
talley = talley + 20
p20 = p20 + 1
If talley = 200 Then GoTo done
Next

For i = 1 To fifties
talley = talley + 50
p50 = p50 + 1
If talley = 200 Then GoTo done
Next

For i = 1 To hundreds
talley = talley + 100
p100 = p100 + 1
Next

done:
MsgBox ("Put" & Chr(10) & p1 & " ones" & Chr(10) & p5 & " fives" &
Chr(10) &
p10 & " tens" & Chr(10) & p20 & " twenties" & Chr(10) & p50 & "
fifties" &
Chr(10) & p100 & " hundreds" & Chr(10) & " back in register")
deposit = total - p100 * 100 - p50 * 50 - p20 * 20 - p10 * 10 - p5
* 5 - p1
MsgBox ("deposit " & deposit)
End Sub


It will tell you what bills to return to the register and what
amount to
deposit

--
Gary's Student


"George" wrote:

Hi;
I am working in a company that we use cash balancing sheet at the
end of the
day
in theory there is 200$ at morning, at the end of the day deposit
all the
balance - 200$ for the nex day.
rules are to take out the biggest cash bills in first.
I have saved files in http://www.savefile/files/58143
thank you
George..