Lil Stinker
Board Regular
- Joined
- Feb 16, 2022
- Messages
- 151
- Office Version
- 2019
- Platform
- Windows
Hey Folks-
I need help coming up with a formula that can calculate the weekly rental cost based on a one week minimum whether the rental term is a few days or, a week and a few days.
Basically, if they rent equipment for anywhere from 1-7 days, there is the weekly minimum cost of $150. However, if they extend over a week to, let's say, 10 days, then it needs to prorate to a daily cost ($21.43/day) after the one week minimum is met. So, a 10-day rental would come to $214.29, while a 4-day rental would be $150. Rates will vary, so $150 is just an example here.
Currently, part of our equipment rents on a one day, one week format so even if they rent equipment for 10 days, the cost will be for two weeks total. I use this DATEDIF formula below to calculate the weekly rental period there. Then I just multiply the cells to get the Subtotal. No issues.
=ROUNDUP((DATEDIF($E$11,$E$13,"d")/7),0))
However, if I try =ROUNDUP((DATEDIF($E$11,$E$13,"d")/7),2)), it breaks the week down in decimals, which is fine, but I don't know to lock in that first week and then start prorating only after 7 days.
Any suggestions would be greatly appreciated.
Sample table:
I need help coming up with a formula that can calculate the weekly rental cost based on a one week minimum whether the rental term is a few days or, a week and a few days.
Basically, if they rent equipment for anywhere from 1-7 days, there is the weekly minimum cost of $150. However, if they extend over a week to, let's say, 10 days, then it needs to prorate to a daily cost ($21.43/day) after the one week minimum is met. So, a 10-day rental would come to $214.29, while a 4-day rental would be $150. Rates will vary, so $150 is just an example here.
Currently, part of our equipment rents on a one day, one week format so even if they rent equipment for 10 days, the cost will be for two weeks total. I use this DATEDIF formula below to calculate the weekly rental period there. Then I just multiply the cells to get the Subtotal. No issues.
=ROUNDUP((DATEDIF($E$11,$E$13,"d")/7),0))
However, if I try =ROUNDUP((DATEDIF($E$11,$E$13,"d")/7),2)), it breaks the week down in decimals, which is fine, but I don't know to lock in that first week and then start prorating only after 7 days.
Any suggestions would be greatly appreciated.
Sample table:
Book2 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
E | F | G | H | I | J | K | L | |||
7 | Description | Column1 | Column2 | QTY | Unit Rate | Weeks | Item Subtotal | |||
8 | Pickup Date | Walkie Talkie | 1 | 5.00 | 1.00 | $5.00 | ||||
9 | 2/14/2022 | |||||||||
10 | Billing Start | |||||||||
11 | 2/14/2022 | |||||||||
12 | Billing End | |||||||||
13 | 2/18/2022 | |||||||||
14 | Return Date | |||||||||
15 | 2/19/2022 | |||||||||
16 | ||||||||||
17 | ||||||||||
18 | ||||||||||
19 | Subtotal | $5.00 | ||||||||
22 | TOTAL AMOUNT | $5.00 | ||||||||
Sheet 1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
K8:K18 | K8 | =IF(ISBLANK(I8),"",ROUNDUP((DATEDIF($E$11,$E$13,"d")/7),0)) |
L8:L18 | L8 | =IF(ISBLANK(I8),"",I8*J8*K8) |
L19 | L19 | =SUM(Table1[Item Subtotal]) |
L22 | L22 | =L21 |