Saltar al contenido
GridBelt
  • Prueba de Excel
  • Práctica
  • Programas
  • Precios
Iniciar sesión
Empezar la prueba gratuita
  • Prueba de Excel
  • Práctica
  • Programas
  • Precios
Iniciar sesiónCrear cuenta
Empezar la prueba gratuita
GridBelt

Practica Excel en tu navegador.

Prueba de Excel

  • Nivel 1: Principiante
  • Nivel 2: Intermedio
  • Nivel 3: Experto
  • Prueba de Excel en 7 días
  • Clasificación
  • Prueba de Excel para entrevistas
  • Evaluación de Excel de Indeed

Práctica

  • Todos los ejercicios
  • Programas
  • Para principiantes

Guías

  • Fórmulas de Excel
  • Atajos de Excel

Empresa

  • Acerca de
  • Precios
  • Cómo corregimos

© GridBelt. Todos los derechos reservados.

  • Política de privacidad
  • Términos de uso
  • Política de reembolso

Excel es una marca comercial de Microsoft Corporation. Indeed, TestGorilla, SHL y otras marcas son propiedad de sus respectivos titulares. GridBelt es un sitio de práctica independiente y no está afiliado a Microsoft, TestGorilla, SHL ni Indeed, ni respaldado ni patrocinado por ellos.

  1. Práctica
  2. /
  3. INDEX and MATCH

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

  • Intermedio
  • ~6 min
  • INDEX and MATCH

Enunciado en inglés

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.

Qué tienes que hacer

  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.

Celdas de respuesta

Corrección

Escribe tu fórmula en la cuadrícula, presiona Enter y luego haz clic en Comprobar. Evaluamos el valor de cada celda de respuesta y la fórmula que lo produce.

Tareas

  1. Sin comprobarOn 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.

Para las tareas de hoja de cálculo se recomienda una pantalla grande. La hoja se desplaza dentro de este recuadro.

StartInsertFormulasDataView
A1fxPreparando tu libro…
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

Escribe tu fórmula en la hoja y luego comprueba.

Sobre este ejercicio

Un conjunto de datos de 125 filas en 2 hojas, una celda de respuesta, unos 6 minutos. Se corrige en tu navegador: el valor y la fórmula que lo produce, con comentarios que te dicen qué arreglar.

Cómo resolverlo

  • 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.

Otras formas válidas

  • =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)

Errores frecuentes

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).

Cómo corregimos

Se acepta cualquier fórmula que produzca el resultado correcto, salvo que la tarea nombre una función: entonces otra función obtiene media puntuación. Comparamos los valores con una pequeña tolerancia y, en el texto, ignoramos mayúsculas y espacios. Un número correcto escrito a mano en lugar de una fórmula obtiene media puntuación. Las tareas de varias celdas obtienen la puntuación completa con el 100% de las celdas correctas y media puntuación desde el 50%. Cuando importa, también cambiamos una celda de entrada en una copia de tu hoja y comprobamos que tu fórmula se adapta.

Respuestas calculadas con las reglas de Excel 365 y comprobadas en nuestro corrector el 16 de noviembre de 2026. Autor: GridBelt team.

En estos programas

  • Excel test in 7 days, Plan del nivel 2Día 2
  • Excel for Data AnalystsDía 4
  • Excel for Sales and MarketingDía 4

Ejercicios relacionados

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

Referencia de la función

Documentación oficial

Siguiente ejercicio

Two-way lookup in a matrix