+ Reply to Thread
Results 1 to 11 of 11

Find Cheapest Price Combination

Hybrid View

  1. #1
    Registered User
    Join Date
    07-11-2012
    Location
    Hamilton, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    25

    Find Cheapest Price Combination

    Hi! Again! You guys are so helpful I have to ask this question because I know you will be able to help me!

    I have three rental prices. a 1 day rental costs 700
    a 1 week rental costs 1900
    a 4 week rental costs 5500

    I have a certain number of days ill need the rental which varies per project.
    I would LOVE for excel to make sure i have the correct number of days required covered at the cheapest cost.

    at first I was using if the number of days is less than 3 then use (2) "day" rentals since if i had 3 days it would be cheaper to just buy a week. and that worked but then when i got to one week my formula was waaay to long and not even correct.

    the only catch (and im not sure that it is) is that we can only use the rental for the 5 work days in a week.

    I hope this is enough information if anyone could give me a place to start, or link to another page that would be able to help me, it would be great!

  2. #2
    Registered User
    Join Date
    07-26-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Find Cheapest Price Combination

    Hi

    Have you tried using a formula with Min and If statements. You'd have to have two if statements but it shouldn't be too long.

    Something like this but with the correct cells for the dates and where the prices are stored.


    I have the day price in Cell B1, the week in B2, and the 4 weeks in B3

    I then put the number of days for rental in B5

    =Min(B5*B1, If(B5/5< 1, B2, B2*(B5/5)), If(B5/5 < 4, B3, B3*(B3/5)))


    I don't know if thats exactly what you were looking for but it gave me 5500 when i did 15 days and then 1900 when i did 3.
    Also its being divided by 5 for the days in the week so i excluded sat and sun.

    Hope that helps

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

    Re: Find Cheapest Price Combination

    Based on the 'catch' does that mean that 4 week rental would be entered as 20 days, or do you enter start and end dates?

    A sample sheet showing how you enter your data, and how you want the results would be helpful.

  4. #4
    Registered User
    Join Date
    07-11-2012
    Location
    Hamilton, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Find Cheapest Price Combination

    @jason.b75 yes i suppose it would work better to enter it as 20 days to not have to convert it to weeks etc.

  5. #5
    Registered User
    Join Date
    07-11-2012
    Location
    Hamilton, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Find Cheapest Price Combination

    @thecuteone: that works, but if i have need more than 4 weeks id like it to spit out the price for (2) 4 week rentals, or (1) 4 week rental and (1) 1 week rental, or whatever the need is. @jason im working on getting a sheet


    its cheaper to use (2) 1 week rentals-->3800
    rather than (1) 4 week rental--> 5500 and i cant get it recognize that

  6. #6
    Registered User
    Join Date
    07-11-2012
    Location
    Hamilton, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Find Cheapest Price Combination

    I just cut the info from my master sheet into this sample. Hope it gives some type of visual as to what id like to do
    Attached Files Attached Files

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

    Re: Find Cheapest Price Combination

    I don't think you will find an easy way to do this with a single formula, there is a table in sheet 2 used to provide the correct combinations.

    sample3(1).xlsx

  8. #8
    Registered User
    Join Date
    07-11-2012
    Location
    Hamilton, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Find Cheapest Price Combination

    Thanks Jason, that will work just fine and its probably the easiest since we dont ever have an need over around 30 days.

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

    Re: Find Cheapest Price Combination

    Unless there are different rates for longer periods then that will work for an unlimited number of days anyway.

    The pattern remains consistant so the formula uses multipliers to calculate beyond the 20 days in the table.

    I tried with random values up to 500 for number of days and it works fine.

  10. #10
    Registered User
    Join Date
    07-11-2012
    Location
    Hamilton, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Find Cheapest Price Combination

    Jason, I JUST realized what you meant with unlimited number of days. Im trying to paste it into my master workbook to make it work and what is table 1? How would I define it? I think thats the only thing Im missing

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

    Re: Find Cheapest Price Combination

    Table1 is the table in sheet 2 of the sample sheet, to define it, copy the original to your master workbook, then with the table, or any cell in the table selected, press Ctrl t, then enter.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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