+ Reply to Thread
Results 1 to 20 of 20

Formula that identifies best rate and cost based on number of days

  1. #1
    Registered User
    Join Date
    11-06-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    10

    Formula that identifies best rate and cost based on number of days

    Hello All,

    I'm looking for a formula that can help the user of the spreadsheet plug in the number of days a piece of equipment needs to be rented and determine the best cost. The issue is that there are 3 different rates: Daily, Weekly and Monthly. Attached is the spreadsheet. Is there anyway to do what I'm asking?
    Attached Files Attached Files

  2. #2
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Re: Formula that identifies best rate and cost based on number of days

    Is this what you are looking for? Past in cell G2
    Please Login or Register  to view this content.
    does the average week rate happen when the day are greater than 5 and the avg month rate when days are greater than 20 or grater than or equal to?
    Last edited by mongoose36; 11-07-2015 at 10:56 AM.
    If your questions has been answered to your satisfaction please don't forget to do the following:

    Add Reputation ... and ... Mark Thread as Solved

    Thanks,

    Ma 10:8b Freely you have received; freely give.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Formula that identifies best rate and cost based on number of days

    Or this slight variation...
    =if(A2="","",A2*B2*IF(B2<=3,D2,IF(B2<=21,E2,F2))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    11-06-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    10

    Re: Formula that identifies best rate and cost based on number of days

    First, I'd like to thank you so much for your attempt to help me, as I'm in over my head.

    Greater than or equal to. I think this formula is close but it doesn't take into consideration best rate possible. For example, if you need a piece of equipment for 4 days, it's cheaper to rent it for the week. Another example is if you need it lets say 7 days, you would be better off renting for 1 week rate and adding 2 daily rates. Does that make sense? Is what I'm asking even possible?

  5. #5
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Re: Formula that identifies best rate and cost based on number of days

    Try this...(see attached screen shot)
    Please Login or Register  to view this content.
    Capture.PNG

  6. #6
    Registered User
    Join Date
    11-06-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    10

    Re: Formula that identifies best rate and cost based on number of days

    Thanks for trying again. Very close!!! The only thing the formula is not doing is taking into account a split situation. For example, if I need the equipment for 25 working days it should charge me one monthly rate and one weekly rate. And again, maybe what I'm asking for is not possible, I don't know.

  7. #7
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Re: Formula that identifies best rate and cost based on number of days

    Try
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    11-06-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    10

    Re: Formula that identifies best rate and cost based on number of days

    Sorry, didn't work, but closer. If I put in 21 days its multiplying B2 by 2 and adding one day rate $152.03. Should be one month + one day ($89.68). I can't thank you enough for your efforts.

  9. #9
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Re: Formula that identifies best rate and cost based on number of days

    Ok I think I finally have it!!! It's ridiculously large, but gets the job done.

    Please Login or Register  to view this content.

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula that identifies best rate and cost based on number of days

    I would take a completely different approach to this problem.

    First of all, I would calculate the most economic combination of days weeks and months to hire the equipment (in separate columns so you know what instruction to give the hire company), then calculate cost from that.

    In H2 (gives number of single days to book)

    =IF(MOD(B2,5)<=INT(E2/D2),MOD(B2,5),0)

    In I2 (gives number of 5 day weeks to book)

    =IF((INT(MOD(B2,20)/5)+(MOD(B2,5)>INT(E2/D2)))<=INT(F2/E2),INT(MOD(B2,20)/5)+(MOD(B2,5)>INT(E2/D2)),0)

    In J2 (gives number of 20 day months to book)

    =INT(B2/20)+((INT(MOD(B2,20)/5)+(MOD(B2,5)>INT(E2/D2)))>INT(F2/E2))

    In G2 to calculate total cost

    =SUM(H2*D2,I2*E2,J2*F2)*A2

    If you really do just want the total cost without the other information, then all of that can be combined into one formula.
    Last edited by jason.b75; 11-07-2015 at 05:49 PM.

  11. #11
    Registered User
    Join Date
    11-06-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    10

    Re: Formula that identifies best rate and cost based on number of days

    You got it!!! AWESOME WORK!!! Thank you soooo much for this! You ROCK!!

  12. #12
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula that identifies best rate and cost based on number of days

    Who was that post directed to, Rick?

    I hope it wasn't in reply to my post because I've been testing with various numbers of days and just found some wrong results

    Might have to rethink this in the morning.

  13. #13
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula that identifies best rate and cost based on number of days

    Ok, I've revised my suggestion, and I think this gives accurate results but this is only a quick fix.

    In H2

    =IF(MOD(B2,5)<=INT(E2/D2),IF(((MOD(B2,5)*D2)+((INT(MOD(B2,20)/5)+(MOD(B2,5)>INT(E2/D2)))*E2))<F2,MOD(B2,5),0),0)

    In I2

    =IF((INT(MOD(B2,20)/5)+(MOD(B2,5)>INT(E2/D2)))<=INT(F2/E2),IF(((INT(MOD(B2,20)/5)+(MOD(B2,5)>H2))*E2)<F2,INT(MOD(B2,20)/5)+(MOD(B2,5)>H2),0),0)

    In J2

    =INT(B2/20)+(((I2*5)+(H2))<MOD(B2,20))

    I'll test it some more later and see if I can shorten the first 2 formula.

  14. #14
    Registered User
    Join Date
    11-06-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    10

    Re: Formula that identifies best rate and cost based on number of days

    Jason,

    It was directed to cplettner, sorry for the confusion. Thanks for your suggestions and hard work as well. It is much appreciated.

  15. #15
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula that identifies best rate and cost based on number of days

    Quote Originally Posted by madrick1991 View Post
    Jason,

    It was directed to cplettner, sorry for the confusion. Thanks for your suggestions and hard work as well. It is much appreciated.
    No worries Rick, you're welcome.

    I haven't looked into cplettner's formula in detail, but I would disagree with the results for 7 and 27 days, there may be other discrepancies that I haven't seen.

  16. #16
    Registered User
    Join Date
    11-06-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    10

    Re: Formula that identifies best rate and cost based on number of days

    Jason,

    You are correct, I did some quick testing yesterday and it looked right but as I started to work through it more it is not accurate in every situation. Thank you so much for bringing it to my attention. I'm still testing your suggestion but so far it looks good. Thank you again, for your assistance.

    cplettner - Thank you as well for all your effort.

  17. #17
    Registered User
    Join Date
    11-06-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    10

    Re: Formula that identifies best rate and cost based on number of days

    Jason,

    Why can't I sum the cost column. The $s do not populate in the total field. Thanks

  18. #18
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula that identifies best rate and cost based on number of days

    It's hard to say without seeing an updated sheet, if you're using the 4th formula from my original post to sum the cost, then it requires days on column B and quantity in column A, if either is empty then it will show $0

    If you want the cost per unit in $ rather than the total cost for the quantity needed, then just delete *A2 from the cost formula.

    I've done a bit more testing and refined some of the formula slightly, I've set it all up in the attached sheet.
    Attached Files Attached Files

  19. #19
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Re: Formula that identifies best rate and cost based on number of days

    Jason is correct! My formula does indeed miscalculate on some "best price" values, which makes it entirely useless. Jason, thanks for catching that!

  20. #20
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula that identifies best rate and cost based on number of days

    Quote Originally Posted by cplettner View Post
    My formula does indeed miscalculate on some "best price" values, which makes it entirely useless.
    I wouldn't go that far, it only appears to be inaccurate if the number of days is 7, 27, 47, etc. So effectively it's 95% accurate

    Probably just needs a little tweak somewhere, but I wasn't going to attempt to try and follow all of that rounding up and down

+ 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] Formula Needed to Calc Total Cost for Using Equipment when Rate Increases per Days Used
    By Mollylou85 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-06-2015, 01:41 PM
  2. Replies: 0
    Last Post: 06-11-2015, 03:12 AM
  3. Formula to distribute number across several days based on predefined percentages
    By friedgoldmole in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-09-2015, 05:41 PM
  4. Replies: 0
    Last Post: 03-25-2014, 03:04 PM
  5. Excel formula that identifies the next number in the series.
    By crazysniper in forum Excel General
    Replies: 3
    Last Post: 03-07-2012, 07:09 PM
  6. cost based on number of units where cost changes
    By jbowling in forum Excel General
    Replies: 3
    Last Post: 08-22-2011, 02:36 PM
  7. Formula help considering cost and success rate
    By BeatBama in forum Excel General
    Replies: 2
    Last Post: 03-03-2011, 01:17 PM

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