Hi
I'm hoping someone can help me with the following nested formula issue.
What I would like to do is calculate a cumulative demurrage charge based on the values in two reference cells.
Formula to go into cell H34.
Reference cells are H7 (20FT/40FT) & H27 (calculated field - number of days).
If H7=20FT & H27=30, then the formula should work as follows
5 days @ €35 (D29) = €175, plus,
8 days @ €55 (D30) = €440, plus,
14 + days @ €66 (D31) = €1122.
SUMPRODUCT = €175 + €440 + €1122 = €1737
If H7=40FT & H27=30, then the formula should work as follows
5 days @ €60 (F29) = €300, plus,
8 days @ €100 (F30) = €800, plus,
14 + days @ €115 (F31) = €1955.
SUMPRODUCT = €300 + €800 + €1955 = €3055
Similarly, if the value in H27 fell between one on the early date ranges, the formula would only calculate those days.
Example 1
If H7=20FT & H27=10, then the formula should work as follows
5 days @ €35 (D29) = €175, plus,
5 days @ €55 (D30) = €275, plus,
SUMPRODUCT = €175 + €275 = €450
If H7=40FT & H27=10, then the formula should work as follows
5 days @ €60 (F29) = €300, plus,
5 days @ €100 (F30) = €500, plus,
SUMPRODUCT = €300 + €500 = €800
Example 2
If H7=20FT & H27=4, then the formula should work as follows
4 days @ €35 (D29) = €140,
SUMPRODUCT = €140
If H7=40FT & H27=4, then the formula should work as follows
4 days @ €60 (F29) = €240, plus,
SUMPRODUCT = €240
I hope the above makes sense.
thanks for your help in advance
I'm hoping someone can help me with the following nested formula issue.
What I would like to do is calculate a cumulative demurrage charge based on the values in two reference cells.
Formula to go into cell H34.
Reference cells are H7 (20FT/40FT) & H27 (calculated field - number of days).
If H7=20FT & H27=30, then the formula should work as follows
5 days @ €35 (D29) = €175, plus,
8 days @ €55 (D30) = €440, plus,
14 + days @ €66 (D31) = €1122.
SUMPRODUCT = €175 + €440 + €1122 = €1737
If H7=40FT & H27=30, then the formula should work as follows
5 days @ €60 (F29) = €300, plus,
8 days @ €100 (F30) = €800, plus,
14 + days @ €115 (F31) = €1955.
SUMPRODUCT = €300 + €800 + €1955 = €3055
Similarly, if the value in H27 fell between one on the early date ranges, the formula would only calculate those days.
Example 1
If H7=20FT & H27=10, then the formula should work as follows
5 days @ €35 (D29) = €175, plus,
5 days @ €55 (D30) = €275, plus,
SUMPRODUCT = €175 + €275 = €450
If H7=40FT & H27=10, then the formula should work as follows
5 days @ €60 (F29) = €300, plus,
5 days @ €100 (F30) = €500, plus,
SUMPRODUCT = €300 + €500 = €800
Example 2
If H7=20FT & H27=4, then the formula should work as follows
4 days @ €35 (D29) = €140,
SUMPRODUCT = €140
If H7=40FT & H27=4, then the formula should work as follows
4 days @ €60 (F29) = €240, plus,
SUMPRODUCT = €240
I hope the above makes sense.
thanks for your help in advance