Ghost Sheet

Look up a band instead of nesting IFs

How do I replace a long nested IF for shipping rates by weight?

This is the task for this topic. It is part of the plan; the level check before it is free.
D2Type a formula for D2, starting with =

Click the sheet or the button: the task opens in your workspace, ready to type

ABCDE
1ShipmentCustomerWeight (lb)Charge
2SH-5301Rowan Cafe175
3SH-5302Fern & Field252
4SH-5303Kite Studio60
5SH-5304Elm Street Clinic20
6SH-5305Rowan Cafe305
7SH-5306Larch & Co19
8SH-5307Birch Legal237
9SH-5308Moss Dental46
10SH-5309Quill Books128
11SH-5310Alder Dentists100
12SH-5311Larch & Co216
13
14
15
16
17
18
19
20
21
22
23
24
25
dashed: the answer to reachblack: matchesblue: right after new datared: wrong

Why it works

What it does
Put the bands in a small table: the lower edge of each band and its result. An approximate lookup returns the band a value falls into. When the rate card changes, you edit the table, not the formula.
The shape of the formula
=XLOOKUP(value, band starts, band results, , -1)
How to remember it
Rules belong in a table you can see, not in brackets you have to count.
The usual mistake
Hard-coding the limits in a nested IF. A new rate card means rewriting the formula, and one typo moves a band.

Keep practicing

Updated