Practice problems / Lookup & Reference

Find tax bracket using approximate match (VLOOKUP)

Medium Lookup & Reference
Description
Hints 0/5
Solutions 2
–
Test case
1
2
3
Reset
Submit
fx
A
B
C
D
E
F
G
1
2
3
4
5
6
7
8
9
10
Loading interactive spreadsheet...
Preparing grid cells and formula calculation engine
○ Ready Enter formula in highlighted cells, then click Submit.

The problem

Problem statement

HR needs to compute the withholding tax rate for each employee's annual taxable income. The reference table in A2:B5 lists income thresholds in ascending order (0, $30,000, $60,000, $100,000) and their corresponding tax rates. Fill the Tax Rate cells F2:F4 using VLOOKUP with approximate match so each employee is assigned the rate matching their income tier in E2:E4.

Approximate match (TRUE) needs ascending thresholds, and the boundary belongs to the higher tier — case 3 is exactly 30,000.

Problem data

Show the sheet as a table (selectable, copyable)
The exercise data, as a table
ABDEF
1 Min IncomeTax RateEmployeeAnnual IncomeTax Rate
2 00.1Alice52000
3 300000.15Bob85000
4 600000.2Charlie25000
5 1000000.3

Notes

VLOOKUP's 4th parameter (range_lookup) controls the match mode. Passing TRUE (or omitting it) enables approximate match. In approximate mode, the lookup table MUST be sorted in ascending order. VLOOKUP scans down until it finds the largest value that is less than or equal to lookup_value. For example, $52,000 is greater than $30,000 but less than $60,000, so it matches the $30,000 row (15%).

How to approach

Your answer goes in F2:F4. On submit we re-run your formula against 3 different sets of input, so a hardcoded number will fail — the formula has to follow the cells.

  1. Target cells are F2:F4 — start in F2, then fill down
  2. In F2, lookup_value is E2, table_array is A2:B5
  3. Remember to lock the reference table with $ ($A$2:$B$5)
  4. The tax rate is in column 2 of the lookup table
  5. Set range_lookup to TRUE (or 1) for approximate match

Official solutions

Show 2 solutions — try it yourself first

Approach 1: VLOOKUP with TRUE approximate match

=VLOOKUP(E2, $A$2:$B$5, 2, TRUE)

VLOOKUP searches the sorted column A for the largest threshold <= E2. For $52,000, it selects $30,000 and pulls 0.15 (15%) from column 2.

Approach 2: VLOOKUP with numeric 1 for approximate match

=VLOOKUP(E2, $A$2:$B$5, 2, 1)

In Excel and Google Sheets, 1 is equivalent to TRUE for range_lookup, activating approximate match.

Function guide

Related practice

FAQ

When should I use approximate match (TRUE) in VLOOKUP?

Use approximate match when looking up numbers in ranges or tiers, such as tax brackets, shipping rates, volume discounts, or exam letter grades. Never use TRUE for exact text lookups like SKU, email, or employee ID.

Why must the lookup table be sorted ascending for approximate match?

VLOOKUP uses a binary-like scan that assumes the first column is ordered from smallest to largest. If the table is unsorted, VLOOKUP will stop early or return completely unpredictable values.

What happens if lookup_value is smaller than the first tier?

If lookup_value is smaller than the minimum value in the first row (e.g. less than 0 in this table), VLOOKUP returns #N/A because no valid tier exists.