Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
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.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default formula calculate charges based on hours

try:

=IF(((C2+D2)-(A2+B2))*24<2,0,(INT(((C2+D2)-(A2+B2))*24/26)+1)*15)

This asumes the dates/times are in DATE/TIME formats i.e 1400 is 14:00

HTH

"Pammy" wrote:

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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formula to calculate total rent charges Narnimar Excel Discussion (Misc queries) 4 July 9th 07 08:26 PM
HOW TO I CALCULATE HOURS AND MINUTES? NEED FORMULA Babs Excel Worksheet Functions 2 March 31st 06 07:01 PM
Formula to calculate hours, and pay Jim Excel Discussion (Misc queries) 3 February 17th 06 10:10 PM
Need formula to calculate hours worked BankC Excel Discussion (Misc queries) 12 January 31st 06 05:38 PM
How do I calculate charges based on elasped time(H:MM) & rate($)? glass-artist-web-developer Excel Discussion (Misc queries) 1 March 12th 05 02:09 AM


All times are GMT +1. The time now is 07:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"