View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Pammy Pammy is offline
external usenet poster
 
Posts: 96
Default formula calculate charges based on hours

I have a vehicle impound spreadsheet that lists:
date-in time-in date-out time-out charge
1/8/2007 1300 1/8/07 1400 $15.00
1/8/2007 1400 1/10/07 1500 $60.00
1/8/2007 1000 1/9/07 1500 $30.00
1/8/2007 1400 1/13/07 1545 $150.00

I have a formula now:
IF(C2=A2,IF(D2<=1400,15,30),IF(D2<=1400,(C2-A2)*30,((C2-A2)+1)*30))
this formula will charge $15.00 if picked up on the same day before 14:00
hrs. After 1400 hrs, it is $30.00 per day.

I need a new formula that will be no charge if picked up within 2 hours the
day it was towed, past 2 hours $15.00 and after 26 hours another $15 will be
charged and after 26 hours another $15 etc.