Excel Formula help, nested > and < then

Ben171

Board Regular
Joined
Jul 2, 2021
Messages
88
HI, please see below table as example, say they are columns A B C D

You can see we have a standard carriage charge, but i am wanting to test whether we can charge a flat rate of 1.5% (of product value) as a new carriage cost. However we do not want to charge any carriage that is less than 7.50, or any carriage that is over £100

For example:
order 1, has a carriage cost of 1.80, so should be set to 7.50,
order 2, has a carriage cost of 155, so should be 100
order 3 is inbetween 7.50 and 100, so can stay at 40.80


Order NumberCarriage charge1.5% of product valminimum 7.50 / max 100
1​
£15.00​
£1.80​
£7.50​
2​
£35.00​
£155.26​
£155.26​
3​
£15.00​
£40.80​
£40.80​
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
If you just want to return the correct value then it's a basic median.
Excel Formula:
=MEDIAN(7.50,100,1.5% of product val)
 
Upvote 0
Hi Ben171,

Is this what you wanted?

Ben171.xlsx
ABCD
1Order NumberCarriage charge1.5% of product valminimum 7.50 / max 100
21£15.00£1.80£7.50
32£35.00£155.26£100.00
43£15.00£40.80£40.80
Sheet1
Cell Formulas
RangeFormula
D2:D4D2=IF(C2<7.5,7.5,IF(C2>100,100,C2))
 
Upvote 0
Solution
Hi Ben171,

Is this what you wanted?

Ben171.xlsx
ABCD
1Order NumberCarriage charge1.5% of product valminimum 7.50 / max 100
21£15.00£1.80£7.50
32£35.00£155.26£100.00
43£15.00£40.80£40.80
Sheet1
Cell Formulas
RangeFormula
D2:D4D2=IF(C2<7.5,7.5,IF(C2>100,100,C2))
This is exactly what i was after, thank you!

I was getting myself confused but it really is that simple

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,549
Messages
6,120,149
Members
448,948
Latest member
spamiki

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