Lookup: Shipping Rate From A Distance Band With Array Constants

Excel Formulas › Lookup

All versions

Small rate tables do not need their own sheet. LOOKUP with array constants finds the band the distance falls in and returns the matching rate.


Quick formula: The rate for the largest band start at or below the distance:
=LOOKUP(B2,{0,50,150,300},{4.5,6,8.25,11})

120 miles falls in the 50-149 band at $6.00 per pound; 40 lb costs $240.

Functions used (tap for the full reference guide):

The example

Three shipments in different bands.

ABCDE
1CaseMilesLbsRate/lbCost
2Local3520$4.50$90.00
3Regional12040$6.00$240.00
4Cross-country42015$11.00$165.00

The formula

Band starts must be sorted ascending:

=LOOKUP(B2,{0,50,150,300},{4.5,6,8.25,11}) // rate per lb; cost = ROUND(Weight*Rate,2)

How it works

Here is the logic, one piece at a time:

  1. {0,50,150,300} lists band start miles.
  2. {4.5,6,8.25,11} lists the rates.
  3. LOOKUP finds the last start at or below the distance.
  4. Multiply by weight for the cost.

Keep band starts in ascending order.

Try it: interactive demo

Interactive

Enter the distance and weight.

Variations

Rate table

Use a range.

=LOOKUP(B2,H2:H5,I2:I5)

Minimum charge

Apply a minimum.

=MAX(25,D2*E2)

Pitfalls & errors

Unsorted band starts return wrong rates.

A distance below the first band start returns #N/A.

Start the first band at 0.

Practice workbook

📊
Download the free Lookup: Shipping Rate From A Distance Band With Array Constants practice workbook
Edit the yellow distance and weight cells; rate and cost recalculate.

Frequently asked questions

Why LOOKUP?
It does approximate match.
Update rates?
Edit the array.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Tax-Bracket / Tiered-Rate Lookup · XLOOKUP Approximate (Next Smaller/Larger) · Find the Closest Numeric Match

Function references: LOOKUPROUND