cell formula not working to calculate the correct charge after 7 days

steve400243

Active Member
Joined
Sep 15, 2016
Messages
429
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello, I have the below formula used to calculate a charge after a certain amount of days (7), However it is not calculating the charge correctly, it goes to the min charge of $50.00 only for the first 5 days. If the Volume is larger it should calculate the past the min charge. It seems to work fine for the 12th day amount.

$3.50 per cbm, or $50 min charge for next 5 days, 12th day - additional $3.50 per cbm per day no min

Cell H4 - Start Date
H5 - effective storage date - 7th day after date in H4
H6 - 12th day

Cells F13 thru F35 - Volume, will be different in each row.
K13 - K35 - Pickup date

Code:
=IF(F13<0.01,0,ROUND(MAX(((K13-$H$6)*F13*3.5),0)+IF(K13-$H$4<7,0,MAX(((K13-$H$5)*3.5),50)),2))

Any help would be greatly appreciated.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
If i understand test this:

=MAX(50,(MAX(0,K$13-$H$4-10)+MAX(0,K$13-$H$4-5))*3.5*$F13)
 
Upvote 0
If i understand test this:

=MAX(50,(MAX(0,K$13-$H$4-10)+MAX(0,K$13-$H$4-5))*3.5*$F13)

Thanks Steve, Getting closer I think, it is calculating now the correct storage, but it needs to stay the same amount for days 8 thru 12.
$3.50 per cbm, or $50 min charge for next 5 days, 12th day - additional $3.50 per cbm per day no min
 
Upvote 0
How about some examples and expected results. It needs to stay the same makes no sense as surely that depends on the cbm???
 
Upvote 0
Here you go, thank you -

H4 - 01/01/2019
H5 - 01/08/2019 Storage Starts
H6 - 01/13/2019 12th Day

CBM Pickup date
F13 - 18.00 K13 - 01/09/2019 Charge should be - $63.00
F14 - 10.00 K14 - 01/09/2019 $50.00 Min charge
F15 - 18.00 K15 - 01/15/2019 $189.00 - $63.00 for first 11 days, + $126.00 for 13 days
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,989
Members
452,541
Latest member
haasro02

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