Skip to content
GridBelt
  • Excel Test
  • Practice
  • Programs
  • Pricing
Sign in
Start the free test
  • Excel Test
  • Practice
  • Programs
  • Pricing
Sign inCreate account
Start the free test
GridBelt

Practice Excel in your browser.

Excel Test

  • Level 1: Beginner
  • Level 2: Intermediate
  • Level 3: Expert
  • Excel test in 7 days
  • Leaderboard
  • Excel test for interview
  • Indeed Excel assessment

Practice

  • All exercises
  • Programs
  • For beginners

Guides

  • Excel formulas
  • Excel shortcuts

Company

  • About
  • Pricing
  • How we grade

© GridBelt. All rights reserved.

  • Privacy Policy
  • Terms of Use
  • Refund Policy

Excel is a trademark of Microsoft Corporation. Indeed, TestGorilla, SHL and other marks are the property of their owners. GridBelt is an independent practice site and is not affiliated with, endorsed by or sponsored by Microsoft, TestGorilla, SHL or Indeed.

  1. Practice
  2. /
  3. VLOOKUP

VLOOKUP with MATCH practice: pick the month column from an input cell

  • Intermediate
  • ~7 min
  • VLOOKUP

The monthly KPI table for 2026 has 6 metrics in rows 2–7 (Revenue, Orders, New customers, Refunds, Marketing spend, Net profit) and the twelve months Jan–Dec across columns B to M. Management wants a small lookup box: type a KPI in B10 and a month in B11, read the value in B12. VLOOKUP finds the KPI row, but its column number must change with the month — let MATCH work it out from the header row instead of hard-coding it.

What you need to do

  1. 1Click B12 and start with the row lookup: =VLOOKUP(B10,$A$2:$M$7, — the KPI name is in column A, so it can be the first column of the table.
  2. 2For the column number, type MATCH(B11,$A$1:$M$1,0) — MATCH returns the position of the month in the header row (Jan is 2 because column A holds "KPI").
  3. 3Close with ,FALSE) and press Enter: the whole formula is =VLOOKUP(B10,$A$2:$M$7,MATCH(B11,$A$1:$M$1,0),FALSE).
  4. 4Test it: change B11 to Nov and B10 to Net profit — B12 must follow both changes without editing the formula.

Answer cells

Feedback

Type your formula in the grid, press Enter, then Check. We grade the value in each answer cell and the formula behind it.

Tasks

  1. Not checkedIn B12, return the value of the KPI named in B10 for the month in B11: look up the KPI row in A2:M7 and use MATCH on the header row A1:M1 to pick the month column.

Desktop recommended for spreadsheet tasks. The sheet scrolls inside this box.

StartInsertFormulasDataView
A1fxPreparing your workbook…
A
B
C
D
E
F
G
H
I
J
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Sheet1

Enter your formula in the sheet, then check.

About this exercise

A 11-row dataset on one sheet, one answer cell, about 7 minutes. Graded in your browser: the value and the formula behind it, with feedback that names the fix.

How to solve it

  • B12=VLOOKUP(B10,$A$2:$M$7,MATCH(B11,$A$1:$M$1,0),FALSE)

MATCH(B11,$A$1:$M$1,0) scans the header row for the month and returns its position — "Jul" is the 8th cell of A1:M1 — and that number becomes VLOOKUP's column argument. VLOOKUP then finds the KPI row by its name in column A and returns the cell in that column. Because both the row and the column are looked up from the input cells, the box answers any KPI-and-month combination without touching the formula.

Pitfall 1: MATCH must run over a range that starts at the same column as the VLOOKUP table (A1:M1 for a table starting in A); running it over B1:M1 returns a position that is one too small and silently gives the previous month. Pitfall 2: the third argument of MATCH must be 0 for an exact match; with it omitted MATCH assumes the months are sorted alphabetically and returns nonsense. Pitfall 3: month names must match the header exactly — "July" will not find "Jul"; a data-validation list on the input cell removes the problem. Alternatives: =INDEX($B$2:$M$7,MATCH(B10,$A$2:$A$7,0),MATCH(B11,$B$1:$M$1,0)) is the two-way INDEX/MATCH form; =HLOOKUP(B11,$B$1:$M$7,MATCH(B10,$A$1:$A$7,0),FALSE) flips the roles; in 365, =XLOOKUP(B11,$B$1:$M$1,XLOOKUP(B10,$A$2:$A$7,$B$2:$M$7)) nests two XLOOKUPs. Design note: VLOOKUP + MATCH is also how you make a lookup survive inserted columns — the column number is recomputed from the header every time.

Other ways that work

  • =INDEX($B$2:$M$7,MATCH(B10,$A$2:$A$7,0),MATCH(B11,$B$1:$M$1,0)) — INDEX with two MATCH calls
  • =HLOOKUP(B11,$B$1:$M$7,MATCH(B10,$A$1:$A$7,0),FALSE) — HLOOKUP finds the month column, MATCH supplies the row number
  • =VLOOKUP(B10,$A$2:$M$7,MATCH(B11,$B$1:$M$1,0)+1,FALSE) — MATCH over B1:M1 needs +1 to account for the KPI column

Common mistakes

Hard-coding the column: =VLOOKUP(B10,$A$2:$M$7,8,FALSE) shows the right number for Jul and keeps showing Jul after the month in B11 is changed to Nov — the grader changes the month and expects the value to follow.

How we grade

Any formula that produces the right result is accepted, unless the task names a function: then another function earns half credit. We compare values with a small tolerance and ignore case and spaces in text. A correct number typed by hand instead of a formula earns half credit. Multi-cell tasks earn full credit at 100% of cells, half credit from 50%. Where it matters, we also change an input cell on a copy of your sheet and check that your formula follows.

Answers computed with Excel 365 rules and checked in our grading engine on November 16, 2026. Author: GridBelt team.

Related exercises

  • Two-way lookup in a matrixExpert, ~8 min
  • Pull the unit price with VLOOKUP (exact match)Beginner, ~5 min
  • INDEX and MATCH exact lookupIntermediate, ~6 min
  • Replace VLOOKUP with XLOOKUPIntermediate, ~6 min

Function reference

Official documentation

Next exercise

Replace VLOOKUP with XLOOKUP