sprog said:
My problem is that the answer is including $10 per day for the days that people did not attend. These should not be charged.
Sounds like a great way to make some extra money!
Just kidding, of course.
From what you posted, I think all you'll need is the CountIf function.
To calculate the charge for 4 hours and less:
[tab][COLOR=blue white]=CountIf(YourRange, "<=4:00") * 10[/color]
To calculate the charge for more than 4 hours:
[tab][COLOR=blue white]=CountIf(YourRange, ">4:00") * 15[/color]
These formulas assume that
YourRange is whatever range of cells you want to calculate and that you have the times stored as actual times. If your times are stored as plain numbers (4, 3.25, etc.), well,I'd advise you to change them. But failing that you can just use [COLOR=blue white]"<=4"[/color] instead. If you want to use cell references for the times (good idea if there's any change the limits might change), then you could use [COLOR=blue white]"<=" & A1[/color]
[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]
Help us help you. Please read
FAQ 181-2886 before posting.