Pular para o conteúdo
GridBelt
  • Teste de Excel
  • Prática
  • Programas
  • Preços
Entrar
Começar o teste gratuito
  • Teste de Excel
  • Prática
  • Programas
  • Preços
EntrarCriar conta
Começar o teste gratuito
GridBelt

Pratique Excel no seu navegador.

Teste de Excel

  • Nível 1: Iniciante
  • Nível 2: Intermediário
  • Nível 3: Avançado
  • Teste de Excel em 7 dias
  • Ranking
  • Teste de Excel para entrevista
  • Avaliação de Excel da Indeed

Prática

  • Todos os exercícios
  • Programas
  • Para iniciantes

Guias

  • Fórmulas do Excel
  • Atalhos do Excel

Empresa

  • Sobre nós
  • Preços
  • Como corrigimos

© GridBelt. Todos os direitos reservados.

  • Política de Privacidade
  • Termos de Uso
  • Política de Reembolso

Excel é uma marca comercial da Microsoft Corporation. Indeed, TestGorilla, SHL e outras marcas pertencem aos seus respectivos proprietários. O GridBelt é um site de prática independente e não tem afiliação com Microsoft, TestGorilla, SHL ou Indeed, nem é endossado ou patrocinado por eles.

  1. Prática
  2. /
  3. VLOOKUP

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

  • Intermediário
  • ~7 min
  • VLOOKUP

Enunciado em inglês

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.

O que você precisa fazer

  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.

Células de resposta

Correção

Digite sua fórmula na grade, pressione Enter e depois clique em Verificar. Avaliamos o valor de cada célula de resposta e a fórmula por trás dele.

Tarefas

  1. Não verificadoIn 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.

Recomendamos um computador para as tarefas de planilha. A planilha rola dentro desta caixa.

StartInsertFormulasDataView
A1fxPreparando sua pasta de trabalho…
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

Digite sua fórmula na planilha e depois verifique.

Sobre este exercício

Um conjunto de dados de 11 linhas em uma planilha, uma célula de resposta, cerca de 7 minutos. Corrigido no seu navegador: o valor e a fórmula por trás dele, com feedback que mostra o que corrigir.

Como resolver

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

Outras formas que funcionam

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

Erros comuns

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.

Como corrigimos

Qualquer fórmula que produza o resultado certo é aceita, a menos que a tarefa cite uma função: nesse caso, outra função vale metade da pontuação. Comparamos os valores com uma pequena tolerância e ignoramos maiúsculas e espaços no texto. Um número certo digitado à mão em vez de uma fórmula vale metade da pontuação. Tarefas com várias células valem a pontuação integral com 100% das células certas e metade a partir de 50%. Quando faz diferença, também mudamos uma célula de entrada em uma cópia da sua planilha e verificamos se sua fórmula acompanha.

Respostas calculadas com as regras do Excel 365 e verificadas no nosso corretor em 16 de novembro de 2026. Autor: GridBelt team.

Exercícios relacionados

  • Two-way lookup in a matrixAvançado, ~8 min
  • Pull the unit price with VLOOKUP (exact match)Iniciante, ~5 min
  • INDEX and MATCH exact lookupIntermediário, ~6 min
  • Replace VLOOKUP with XLOOKUPIntermediário, ~6 min

Referência da função

Documentação oficial

Próximo exercício

Replace VLOOKUP with XLOOKUP