Here is A way ...
Set up your table with the first column being PostCode, and the second
to nth columns being your delivery price breaks (I used 0, 1, 10, 100,
1000, 10000). Enter your price break amounts into the table. I made
my table at A5:G5.
Now, if you enter a delivery Post Code in, say, A1, and the delivered
liters in B1, the formula at C1 would be:
=VLOOKUP( A1, $A$5:$G$8, MATCH( B1, $A$5:$G$5, 1), 1)
VLookup looks down the column of PostCodes to find the match to A1,
then
Match looks up the next nearest (or exact) match to B1 for the column
value (the "1" arguments tell Excel it doesn't have to find an exact
match).
Chris
|