+ Reply to Thread
Results 1 to 9 of 9

calculating 2days given 2 dates

  1. #1
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    calculating 2days given 2 dates

    Hi Folks

    Mostly got this working, however there has been a change to the scenario.

    trailers called "All others" now have only 1 free day
    The other two types have 2 free days.
    I am calculating the on hire date in column d with
    [Select Code] copy to clipboard

    Please Login or Register  to view this content.
    I am selecting the cost in column H with


    Please Login or Register  to view this content.
    as suggested by Dan from this post
    http://www.excelforum.com/showthread...6618&p=4372155

    I cant figure out how to incorporate the 1 and 2 free date into the above formula
    any help appreciated
    file attached
    Attached Files Attached Files
    Last edited by jimcuk; 05-05-2016 at 04:55 PM.

  2. #2
    Forum Contributor
    Join Date
    10-19-2012
    Location
    Omaha, Nebraska USA
    MS-Off Ver
    Excel 2010
    Posts
    249

    Re: Rental costs again

    Hi jimcuk,

    Here is a formula that I think works. It is revised from the other thread to incorporate the portion for calculating days Jim Topley posted and then I made it so it always subtracts 1 or 2 days, depending on the type of trailer that is specified.

    Please Login or Register  to view this content.
    Hope it helps,

    Dan
    Last edited by djbomaha; 05-04-2016 at 01:51 AM.

  3. #3
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    Re: Rental costs again

    Hi Dan thanks
    seems to be calculating 2 days short for each type ?

  4. #4
    Forum Contributor
    Join Date
    10-19-2012
    Location
    Omaha, Nebraska USA
    MS-Off Ver
    Excel 2010
    Posts
    249

    Re: Rental costs again

    After looking at the sheet you posted again, it looks like you are accounting for the free days in your equations in Column D. If that is true, then the equation in Column F gets simplified to from what I can tell.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    Re: Rental costs again

    Hi Dan
    thanks again, don't know if its my accounting in column d but it is still leaving me one day short.
    for instance inbound 25/4 with standard trailer the 25th and 26th are free day so on hire from the 27th(inclusive) should give 8 days but I am getting 7 days
    Last edited by jimcuk; 05-04-2016 at 12:51 PM.

  6. #6
    Forum Contributor
    Join Date
    10-19-2012
    Location
    Omaha, Nebraska USA
    MS-Off Ver
    Excel 2010
    Posts
    249

    Re: Rental costs again

    To make the formula inclusive, 1 will need to be added to the formula. It has been updated below:

    Please Login or Register  to view this content.

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,617

    Re: Rental costs again

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ben Van Johnson

  8. #8
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    Re: Rental costs again

    Fantastic Dan
    Thanks very much for this.

  9. #9
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    Re: Rental costs again

    Apologies Ben title changed

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] calculating accumulated rental costs
    By jimcuk in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-25-2016, 03:14 PM
  2. Replies: 3
    Last Post: 07-28-2014, 08:57 PM
  3. Calculate Rental Cost With Varying Rates Based On Rental Days
    By jmenh in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-23-2013, 03:17 PM
  4. Rental Spreadsheet
    By Emmak153 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-04-2012, 07:35 PM
  5. [SOLVED] Car Rental
    By limecity in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-18-2009, 08:20 PM
  6. [SOLVED] Template for Condo Rental Costs
    By Jeff Pagano in forum Excel General
    Replies: 0
    Last Post: 06-20-2006, 11:10 PM
  7. compare current mortagage costs to new mortagage costs
    By NEW2TECHBZ in forum Excel General
    Replies: 1
    Last Post: 04-05-2006, 03:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1