Increase Price based on time

uwfenske

New Member
Joined
Feb 15, 2010
Messages
14
I need a solution for a formula to insert into Column J for the Adjusted Price cells.
It need to add on the $10.00 (O2) to the Base Price in Column I for every 10 minutes over 4 hours.
I entered sample values in column J for reference.

I have been using nested IF statements, but at a point where I am "using more levels of nesting that the file format allows". I am using the Excel Workbook format.

Screenshot 2021-08-25 144837.jpg
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Try:

Book4
ABCDEFGHIJKLMNO
1Added PriceOver 4 hours
2$ 10.00
3
4
5HoursBase PriceAdjusted Price
6Trip 13.5$ 100.00$ 100.00
7Trip 24.17$ 100.00$ 110.00
8Trip 34.33$ 100.00$ 110.00
9Trip 44.5$ 100.00$ 130.00
10Trip 54.67$ 100.00$ 140.00
11Trip 64.84$ 100.00$ 150.00
12Trip 75$ 100.00$ 160.00
13Trip 85.17$ 100.00$ 170.00
14Trip 95.33$ 100.00$ 170.00
15Trip 105.5$ 100.00$ 190.00
16Trip 115.67$ 100.00$ 200.00
17Trip 125.84$ 100.00$ 210.00
Sheet10
Cell Formulas
RangeFormula
J6:J17J6=I6+INT(MAX(H6-4,0)*6)*$O$2



Edit: I just noticed that row 14 has a value of $170, when you expect $180. This is due to rounding. This formula might work a bit better for you:

=I6+INT(MAX(H6-4,0)*6+0.05)*$O$2
 
Last edited:
Upvote 0
Eric,
This seems to be on the right track. I did not explain quite accurately.
How would I adjust the formula so that if the time is over 4 hours and up to the 4.17 hours, it adds the extra $10. For instance, if the time is 4.03, it would be $110, then at 4.17 it is also $110, but then at 4.33 it goes to $120.

As an example

1629924792646.png
 
Last edited:
Upvote 0
Edit: I just noticed that row 14 has a value of $170, when you expect $180. This is due to rounding. This formula might work a bit better for you:
@Eric W. I saw that and thought that also, but then I thought about it. .33 is slightly less than 1/3 and therefor I would consider your original formula to be accurate.
 
Upvote 0
Then how about:

Book4
ABCDEFGHIJKLMNO
1Added PriceOver 4 hours
2$ 10.00
3
4
5HoursBase PriceAdjusted Price
6Trip 13.5$ 100.00$ 100.00
7Trip 24.03$ 100.00$ 110.00
8Trip 34.16$ 100.00$ 110.00
9Trip 44.33$ 100.00$ 120.00
10Trip 54.5$ 100.00$ 130.00
11Trip 64.67$ 100.00$ 150.00
Sheet10
Cell Formulas
RangeFormula
J6:J11J6=I6+ROUNDUP(MAX(H6-4,0)*6,0)*$O$2


Note that this is still susceptible to rounding. I changed the 4.17 to 4.16, since .17 is slightly over 10 minutes and triggered the formula to add another $10.
 
Upvote 0
Solution
Eric and johnnyL,
Thank you very much for the help. That ROUNDUP(MAX) is perfect. Thank you so much
 
Upvote 0

Forum statistics

Threads
1,215,636
Messages
6,125,958
Members
449,276
Latest member
surendra75

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top