+ Reply to Thread
Results 1 to 12 of 12

Need help crerating Formula with IF function -

  1. #1
    Registered User
    Join Date
    11-17-2015
    Location
    Louisiana
    MS-Off Ver
    2010
    Posts
    7

    Need help crerating Formula with IF function -

    I need help with a formula. I am trying to develop a calculator to determine the rate to charge customers for rental equipment. we have a daily, weekly, and monthly rate. Our standard practice is as follows: Daily rate is $500, Weekly rate is $1820 and Monthly rate is $5000. The weekly rate is less than 5 days, the monthly rate is less than 3 weeks. Whereas if you rented for five days @ $500 per day would be $2000, However, we would only bill for the weekly rate of $1820 since it is less expensive. Likewise, if you rented for three weeks @ $1820 per week would be $5460, however, we would only bill for the Monthly rate of $5000 since it is less expensive. see attached form i'm sure that I need an "IF" function with rules to make this happen, but I can't seem to make it work correctly. Any help appreciated.

    Mike
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,198

    Re: Need help crerating Formula with IF function -

    Can you add some calculations to show expected results.

  3. #3
    Registered User
    Join Date
    11-17-2015
    Location
    Louisiana
    MS-Off Ver
    2010
    Posts
    7

    Re: Need help crerating Formula with IF function -

    See attached update file In cell F3 I added an if function. I need multiple IF functions to create a series of true. For instance, in this example, if I change the date and the days on rent increase to 6, that would result in a false, so I need to add another "IF". 6 daily rates would result in $3000. the weekly rate is $1820 so if a customer had the equipment for more than 4 days but less than 8, we would just bill $1820 which is less than $3000 (6 $500 daily rates).
    Attached Files Attached Files
    Last edited by mhwhitehead8; 11-17-2015 at 04:23 PM.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,198

    Re: Need help crerating Formula with IF function -

    No formula in F3!

    What I would like was a sample of days (4,8,13,18, 25) and equivalent calculation i.e x @daily + y@weekly + z@monthly if at all possible.

  5. #5
    Registered User
    Join Date
    11-17-2015
    Location
    Louisiana
    MS-Off Ver
    2010
    Posts
    7

    Re: Need help crerating Formula with IF function -

    had to download the file again. uploaded the wrong one for you

  6. #6
    Registered User
    Join Date
    11-17-2015
    Location
    Louisiana
    MS-Off Ver
    2010
    Posts
    7

    Re: Need help crerating Formula with IF function -

    5 days @ $500 per day would equal $2000 but we would charge the $1820 lower weekly rate and the customer could keep the equipment for 7 days. 3 weeks @ $1820 per week would equal $5460 but we would charge the $5000 lower monthly rate

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need help crerating Formula with IF function -

    Try this formula copied down

    =IF(INT(B3/30)>=1,E3*DATEDIF(A3,TODAY(),"m"), IF(INT(B3/7)>=1, MIN(INT(B3/7)*D3,E3), MIN(B3*C3,D3)))
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  8. #8
    Registered User
    Join Date
    11-17-2015
    Location
    Louisiana
    MS-Off Ver
    2010
    Posts
    7

    Re: Need help crerating Formula with IF function -

    Thanks ChemistB but it still isn't jiving.

    If I change the date to 11-09-15 giving me a days on rent of "8", the calculated out would be one week @ $1820 and one day @ $500 equaling $2320. your formula returns a value of $1820. I copied the form back to the thread with your formula copied into cell f3
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,198

    Re: Need help crerating Formula with IF function -

    Try for 9 days rental .....

    =IF(INT(B3/30)>=1,E3*DATEDIF(A3,TODAY(),"m"), IF(INT(B3/7)>=1, MIN(INT(B3/7)*D3+MOD(B3,7)*C3,E3), MIN(B3*C3,D3)))

    You will need similar logic for other calculations to that highlighted: examples below.

    =IF(INT($B3/30)>=1,$E3*INT($B3/30)+INT(MOD($B3,30)/7)*$D3+MOD(MOD($B3,30),7)*$C3,IF(INT($B3/7)>=1,(INT($B3/7)*$D3+MOD($B3,7)*$C$3),MIN(B3*C3,D3)))

    Given month=30 days (?) and using formula above

    Put start date as 9 October giving 41 days rental: 1 month @ 5150 + 1 week @ 1820 + 4 days @ 500 = $8970

    Put start date as 08 October giving 42 days rental: 1 month @ 5150 + 1 week @ 1820 + 5 days @ 500 (30+7 +5 ) = $9470

    or

    is it 1 month (30 days) + 2 weeks ( as 1 week hire < 5 days hire) = $8790

    Should month be defined as 28 days??

    Not simple !!!
    Last edited by JohnTopley; 11-18-2015 at 08:36 AM.

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

    Re: Need help crerating Formula with IF function -

    yes, NOT simple. LOL I was along the same track you are going but kept missing something. Your formulas have given me some new ideas though - maybe going month 28 days would be easier, I may need another column to round the end result to the nearest increment. i.e. if the actual rental is greater than the month rate, then assume the lower month rate. the the base formula still doesn't work with every date scenario however. I need to tweak that still.. I added updated sheet. I added the back in date and that cleaned up the formula variable some. see attached
    Attached Files Attached Files
    Last edited by mhwhitehead8; 11-18-2015 at 11:18 AM.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,198

    Re: Need help crerating Formula with IF function -

    I think you need the second formula I provided: the one using DATEDIF does not work.

    =IF(INT($B3/30)>=1,$E3*INT($B3/30)+INT(MOD($B3,30)/7)*$D3+MOD(MOD($B3,30),7)*$C3,IF(INT($B3/7)>=1,(INT($B3/7)*$D3+MOD($B3,7)*$C$3),MIN(B3*C3,D3)))


    Try changing the 30 to 28 and see how it works out.

  12. #12
    Registered User
    Join Date
    11-17-2015
    Location
    Louisiana
    MS-Off Ver
    2010
    Posts
    7

    Re: Need help crerating Formula with IF function -

    this one is working for my original scenario
    =IF(INT(C3/30)>=1,F3*DATEDIF(A3,TODAY(),"m"), IF(INT(C3/7)>=1, MIN(INT(C3/7)*E3+MOD(C3,7)*D3,F3), MIN(C3*D3,E3)))

    I also want to look at another option
    in this option, assuming the same rental business
    calculate rate as day rate is $500, week rate is $1820, month rate is $5150 but prorate the days based on week and month milestones. i.e. a week would be 5 days and a month would be 22 days. so $1820/5 and $5150/22. one week and 2 days would be: $1820+($364*2)=$2548. This would also assume that every month we would bill $5150. If the unit went out on 11-01-05, we would bill $5150 on 12-01-15, and again on 01-01-16, and so on. I don't necessarily have to get all of the info from one cell formula but even across multiple cell formulas if need be.
    Last edited by mhwhitehead8; 11-18-2015 at 06:35 PM.

+ 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. Multiple Vlookup Normal Formula (not array formula) or VBA Function Required
    By BoopathiK in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-17-2015, 03:06 AM
  2. Replies: 1
    Last Post: 02-06-2014, 09:22 AM
  3. vlookup formula and function to combined with another formula
    By Miss Niki in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2014, 12:03 PM
  4. Formula Creation: Using List Function + Subtraction Function
    By HelpMe! in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-09-2013, 04:52 PM
  5. Replies: 0
    Last Post: 01-19-2013, 01:35 PM
  6. Need Excel formula in Macro using Subtotal formula with If function
    By mbnewton1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2013, 03:00 PM
  7. [SOLVED] I want to create a formula in one sheet, that will function as a formula in other sheets
    By johnw993 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-06-2013, 07:07 PM

Tags for this Thread

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