Ravindra BagaleCourses & study guides मराठी Track your progress

4. Lookup Functions

4.9 Approximate Lookup: Delivery Fee Slabs

Approximate lookup for fee slabs with example — in 30 seconds

What: An approximate lookup finds the slab whose lower limit is just below (or equal to) your value.

Why: Delivery fees, commissions and discounts come in slabs. One formula replaces a long nested IF.

Tiny example: ₹150 falls in the ₹99 slab, so the fee is ₹25. ₹199 is exactly on a slab boundary, so the fee is ₹15.

First look at the data (before → after):

Approximate lookup for fee slabs with example: before and after tables, fictional FreshGo Maharashtra data

Expected result — Fee for each order amount

G: Amount (₹) H: Fee (₹)
64 30
150 25
199 15
270 15
1,299 0

About this data: Teaching sample for a fictional shop “BrightLedger Finance”. Figures and names (e.g. Meera Joshi) are made up for this lesson on approximate lookup delivery fee slabs.

Before table and formula as text

Before — FeeSlabs (sorted ascending, fictional)

A: Min Order (₹) B: Fee (₹)
0 30
99 25
199 15
499 0

About this data: Demo table only — not real customer or company data. Built to practise approximate lookup delivery fee slabs.

Formula / click path

H2: =XLOOKUP(G2, FeeSlabs!$A$2:$A$5, FeeSlabs!$B$2:$B$5, , -1)
match_mode -1 = exact match or next smaller item

Do it step by step:

  1. Type the slab table on a sheet named FeeSlabs: lower limits in A2:A5, fees in B2:B5.
  2. Keep the lower limits as numbers, sorted from small to big.
  3. In Orders H2, type =XLOOKUP(G2, FeeSlabs!$A$2:$A$5, FeeSlabs!$B$2:$B$5, , -1).
  4. Copy down.
  5. Test the boundaries: 98, 99, 198 and 199.

Quick-commerce apps charge a delivery fee based on order value. Here is a fictional slab table FeeSlabs (sorted ascending on Min Order):

Min Order (₹) Fee (₹) Meaning
0 30 Orders below ₹99
99 25 ₹99 – ₹198
199 15 ₹199 – ₹498
499 0 Free delivery from ₹499

About this data: Made-up rows so you can copy the pattern for approximate lookup delivery fee slabs. Currencies may use ₹, £, € or $.

Three ways to get the fee for Amount in G2:

=VLOOKUP(G2, FeeSlabs!$A$2:$B$5, 2, TRUE)
=INDEX(FeeSlabs!$B$2:$B$5, MATCH(G2, FeeSlabs!$A$2:$A$5, 1))
=XLOOKUP(G2, FeeSlabs!$A$2:$A$5, FeeSlabs!$B$2:$B$5, , -1)
Amount Fee
₹64 ₹30
₹150 ₹25
₹199 ₹15 (exact slab boundary)
₹270 ₹15
₹1,299 ₹0

About this data: Fictional worksheet used in class. Safe to edit; nothing here is live production data.

The same pattern works for commission slabs, rider incentive bands, discount tiers or grading.

Ravindra Bagale's Tip

In a slab table, many students write the range as text like "99–198" – Excel doesn't understand that. Write only the lower limit as a number and keep the table sorted ascending. VLOOKUP TRUE gives the wrong fee on an unsorted table, with no error – that's why XLOOKUP −1 is safer, because it doesn't depend on sorting.

Practice task

Create a rider incentive slab: 0–19 deliveries ₹0, 20–29 ₹200, 30–39 ₹400, 40+ ₹700. Calculate the incentive for ten riders with all three methods and check that they agree.

Loading practice tasks...

  1. Fee for ₹150 (Easy): Find the fee for an order of ₹150.
  2. Fee for ₹64 (Easy): Find the fee for ₹64.
  3. Courier: 0.3 kg parcel (Easy): Find the charge for 0.3 kg.
  4. Exactly on the edge (Medium): Find the fee for ₹199.
  5. Big order (Medium): Find the fee for ₹1299.
  6. Courier: 2.5 kg parcel (Medium): Find the charge for 2.5 kg.
  7. Courier: exactly 5 kg (Medium): Find the charge for 5 kg.
  8. The VLOOKUP way (Hard): Find the fee for ₹270 with VLOOKUP.
  9. Customer pays (Hard): Find what the customer pays for a ₹98 order (98 + fee).
  10. Courier: two parcels (Hard): Find the charge for 2 parcels of 0.75 kg each.

Quick revision cards

Three standalone cards. Each one explains the idea with its own example. Scan the QR to open this lesson.

Revision card 1: What is Approximate Lookup Delivery Fee Slabs?
Card 1: What is Approximate Lookup Delivery Fee Slabs? · Download PNG
Revision card 2: Tiny example — Approximate Lookup Delivery Fee Slabs
Card 2: Tiny example — Approximate Lookup Delivery Fee Slabs · Download PNG
Revision card 3: Checklist — Approximate Lookup Delivery Fee Slabs
Card 3: Checklist — Approximate Lookup Delivery Fee Slabs · Download PNG