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. INDEX and MATCH

INDEX MATCH practice: pull the hourly rate for every timesheet entry

  • Intermediate
  • ~6 min
  • INDEX and MATCH

Payroll receives 100 weekly timesheet entries for October 2026 — four weeks for 25 hourly employees — with the employee ID in column C and the hours in column D. The hourly rates live on the Staff sheet (ID, name, department, hourly rate), in roster order rather than sorted. Pull the rate for every entry with INDEX and MATCH: MATCH finds the position of the ID in the Staff list, INDEX returns the rate at that position.

What you need to do

  1. 1On Timesheet, click E2 and start from the inside: MATCH(C2,Staff!$A$2:$A$26,0) returns the row position of this employee's ID in the Staff list (0 = exact match). Click the Staff tab and select the column; F4 / ⌘T locks it.
  2. 2Wrap it in INDEX: =INDEX(Staff!$D$2:$D$26,MATCH(C2,Staff!$A$2:$A$26,0)) — INDEX returns the cell of the rate column at that position. Press Enter.
  3. 3Fill E2 down to E101. Both Staff ranges must stay locked; only C2 moves.
  4. 4Check that the rate column (D) and the ID column (A) in your formula cover exactly the same rows — INDEX and MATCH count positions, so an offset of one row returns the wrong employee's rate.

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 checkedOn the Timesheet sheet, in E2, use INDEX and MATCH to return the hourly rate (Staff column D) of the employee ID in C2, matching against the Employee ID column of the Staff sheet, then fill down to E101.

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 125-row dataset on 2 sheets, one answer cell, about 6 minutes. Graded in your browser: the value and the formula behind it, with feedback that names the fix.

How to solve it

  • Timesheet!E2=INDEX(Staff!$D$2:$D$26,MATCH(C2,Staff!$A$2:$A$26,0))

MATCH(C2,Staff!A2:A26,0) answers "which row of the ID list holds this ID?" with a position — a 1 for the first employee, 25 for the last — and the 0 insists on an exact match. INDEX(Staff!D2:D26, position) then returns the cell of the rate column at that same position. The two functions split the lookup into "find the row" and "read the column", which is why the rate column can be anywhere — left, right or on another sheet — and why inserting a column in Staff never breaks the formula.

Pitfall 1: the INDEX range and the MATCH range must be aligned — Staff!D1:D26 with Staff!A2:A26 is off by one and returns the previous employee's rate for everyone, with no error to warn you. Pitfall 2: leaving out the 0 in MATCH switches to approximate match; on this unsorted roster that returns wrong positions silently. Pitfall 3: MATCH returns #N/A when the ID is missing; wrap the whole INDEX in IFERROR or IFNA when the timesheet can contain IDs of leavers. INDEX/MATCH vs VLOOKUP: same result as =VLOOKUP(C2,Staff!$A$2:$D$26,4,FALSE) here, but INDEX/MATCH looks left, survives inserted columns, and on big tables a single MATCH can feed several INDEX formulas (rate, department, name) instead of repeating the search. In Excel 365, =XLOOKUP(C2,Staff!$A$2:$A$26,Staff!$D$2:$D$26) is the one-function replacement; INDEX/MATCH remains the form that opens in every Excel version and in most other spreadsheet tools.

Other ways that work

  • =INDEX(Staff!$A$2:$D$26,MATCH(C2,Staff!$A$2:$A$26,0),4) — INDEX over the whole table with a column number
  • =IFERROR(INDEX(Staff!$D$2:$D$26,MATCH(C2,Staff!$A$2:$A$26,0)),"Unknown ID") — with a fallback for IDs that are not on the roster
  • =XLOOKUP(C2,Staff!$A$2:$A$26,Staff!$D$2:$D$26) — Excel 365 equivalent (not accepted here: this task practices INDEX and MATCH)

Common mistakes

Swapping the roles: =MATCH(C2,Staff!$D$2:$D$26,0) or =INDEX(Staff!$A$2:$A$26,…) — MATCH must search the column that contains the key (IDs), INDEX must return from the column you want (rates).

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.

In these programs

  • Excel test in 7 days, Level 2 planDay 2
  • Excel for Data AnalystsDay 4
  • Excel for Sales and MarketingDay 4

Related exercises

  • Two-way lookup in a matrixExpert, ~8 min
  • Last order date per customerExpert, ~10 min
  • Pull the unit price with VLOOKUP (exact match)Beginner, ~5 min
  • Look left: employee ID by emailExpert, ~6 min

Function reference

Official documentation

Next exercise

Two-way lookup in a matrix