Hello

I have a rates tariff which I would like to automate,

The tariff structure is

First half kilo : Per half kilo up to 5 : +5 kilos : +20 kilos : + 30 kilos

I am trying to do so by using something like this:-

=IF(O13<0.5,D13,IF(O13>0.5<5,13*F13*2+D13-F13,IF(O13>5<20,O13*L13,IF(O13>20<30,O13*M13,IF(O13>30,O13*N13)))))

Which does not work.

Basically I want the user to enter a weight into O13 and then have the rate calculated as follows

1. if the weight in O13 is less than 0.5 the rate in D13 applies
2. If the weight is greater than 0.5 the rate is the first half kilo (D13) + the rate for every half kilo up to 5 kilos (if somebody shipped 3 kilos the rate would be D13 -first half) + 2.5 kilos * F13 * 2)
3. if the weigh is >5 kilos but <20 kilos the flat rate is O13*L13
4. If the weight is >20 kilos but <30 kilos the flat rate is O13*M13
5. if the weight is >30 kilos the flat rate is 013*N13

Could somebody help me to restructure my formula so that it works

Thank you very much