# Excel/Excel Formula

Question
I need help writing a formula that helps me finding out the days that I need to charge after certain equipment rental period is due.  The equipment is free of rent for the first 28 days, and the rental can start any day of the week, but after it has been returned, the return date can also fall in any day of the week.  Please see the example below. I hope that you can help.

Al
1   A   B   C   D   E   F   G   H   I   J   K   L   M
2   Delivered   Returned    28 Day Rental Price     Daily Rental    Rental Start Date   11/18/12   11/25/12   12/2/12   12/9/12   12/16/12   12/23/12   12/30/12   1/6/13
3          Days          5   7   1
4   9/28/2012   12/10/12   100    \$  3.571    11/27/12          \$17.86     \$ 25.00     \$  3.57

It's not very clear from the example, mainly (I think) due to the fixed width of text in these questions.  My direct email is aidan.heritage@virgin.net which would allow you to send me an example file - but BASICALLY it sounds reasonably straightforward, in that to excel dates are simply numbers - so returned date - rental start date would give you a number of days - so if it is as simple as rate for days over 28 multiplied by days then it is along the lines of

=max(0,ReturnDate-StartDate-28)*RentalRate

The max bit of the function ensures that items returned within the 28 day period get charged zero rather than using the negative number that would otherwise be returned.
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

#### Aidan Heritage

##### Expertise

I have provided first hand support since `95 for Microsoft Office majoring in Word and Excel - support for all versions from 2 onwards. I'm based in the UK, so please allow for time differences when asking me questions from other parts of the world!

##### Experience

My background is in the insurance industry and call centre areas, but have been called upon to provide many varied solutions.

Education/Credentials
I'm educated to UK A level standard, but as I left school some 30 years ago that is rather irrelevent - university of life has provided more of a background!