Min / Max together
Errata....
"joeu2004" wrote:
"KristyAlison"
What happens is, the Excel has a check out date (Cell A), and a check in
date (Cell B). If books are returned exceeding 30 days (Cell B - Cell
A), this would be reflected in Cell C on showing the number of days it's
been overdue. A fine would also be calculated in Cell D, $1 is charged
for every day overdue, with a maximum of $60 that we are allowed to
collect by policy.
The problem is here, at times when books are still not returned over 60
days, (say 61 days), I want the cell to show a maximum of 60
If A1 is the check-out date, B1 is the check-in date and C1 is the daily
charge:
=C1*MIN(60,MAX(0,B1-A1-30))
I just read your posting more closely. I see that you used C1 ("cell C")
for another purpose.
Perhaps __your__ C1 is:
=B1-A1-30
and __your__ D1 is:
=E1*MIN(60,MAX(0,C1))
where E1 is the daily charge. E1 is 1 in your example.
|