ExcelFormulas logoExcelFormulas.
Perguntar à IA
Pesquisa e ReferênciaTestado por QA

PROCX (XLOOKUP).

Pesquisa um valor em um intervalo ou matriz e retorna o item correspondente de um segundo intervalo.

Pesquisa e Referência
ExcelExcel 365Excel 2021Google Sheets

Como funciona na prática.

PROCX é uma função essencial no Excel. Pesquisa um valor em um intervalo ou matriz e retorna o item correspondente de um segundo intervalo. Facilita a automação de relatórios, otimiza consultas de dados e garante máxima produtividade no seu fluxo de trabalho.

💡 Em termos simples.

Searches for a value in one list (lookup array) and returns matching information from another list (return array) in the exact same row.

Analogia do Dia a Dia

"Think of XLOOKUP like looking up a word in a dictionary. You have a search word (Employee ID), you scan the dictionary list (ID Column), and you get the corresponding definition (Department Column)."

Sintaxe.

Notação Oficial do Excel
=PROCX(pesquisa_valor; matriz_pesquisa; matriz_retorno; [se_não_encontrada]; [modo_correspondência])
Dica: Argumentos entre colchetes [como_este] são opcionais; todos os outros são obrigatórios.

Argumentos.

Confira abaixo o detalhamento de cada parâmetro aceito por esta função.

lookup_valueObrigatório

The value you want to search for.

Exemplo: D2
lookup_arrayObrigatório

The range or array to search in.

Exemplo: A2:A6
return_arrayObrigatório

The range or array to return values from.

Exemplo: B2:B6
if_not_foundOpcional

Text or value to return if no match is found.

Padrão: "Not Found"
match_modeOpcional

0 = Exact match (default), -1 = Exact or next smaller, 1 = Exact or next larger, 2 = Wildcard match.

Padrão: 0
search_modeOpcional

1 = Search first-to-last (default), -1 = Search last-to-first, 2 = Binary search (sorted asc), -2 = Binary search (sorted desc).

Padrão: 1

Exemplo passo a passo.

Cenário de Aplicação

Department Directory Lookup

Retrieve an employee's Department by searching their Employee ID.

Emp IDDepartmentSalarySearch IDResult Dept
101Engineering105000103—
102Marketing88000——
103Sales95000——
Fórmula Aplicada
=XLOOKUP(D2, A2:A6, B2:B6, "Not Found")
Resultado Esperado::Sales

Evaluates XLOOKUP over the sample table cells, placing the verified output in cell E2.

Gerador de fórmula.

Abrir Assistente Completo

Preencha os campos abaixo para gerar uma fórmula pronta para copiar e colar na sua planilha.

Generated FormulaPronta para copiar

Comportamento do resultado.

Returns "Sales" based on sample evaluation criteria and active cell references.

Amostra de Saída::Sales
Tipo de Dado::Text

Boas Práticas

  • Use XLOOKUP to return multiple items simultaneously by selecting a multi-column return range.
  • Unlike VLOOKUP, XLOOKUP does not break when columns are inserted or deleted in the spreadsheet.
  • Leave match_mode blank if you want an exact match, which is what is needed 95% of the time.

Erros Mais Comuns

  • XLOOKUP is only available in Excel 365, Excel 2021, and Excel for the Web. It will return a #NAME? error in older versions.
  • Ensure the lookup_array and return_array are of equal length; otherwise, XLOOKUP returns a #VALUE! error.
Matriz de Compatibilidade

Compatibilidade de software e versão.

Validação técnica fundamentada nas especificações oficiais da Microsoft e do Google.

Excel✓
Compatível
Excel 365✓
Compatível
Excel 2021✓
Compatível
Excel 2019✕
Não
Google Sheets✓
Compatível
Histórico e Versões do Excel

Introduced in Excel 365 and Excel 2021. Not supported in Excel 2019 or Excel 2016 (#NAME? error).

Notas sobre o Google Planilhas

Fully supported in Google Sheets with identical parameters, default exact match, and search modes.

Perguntas frequentes.

Dúvidas Técnicas
Can XLOOKUP look up values to the left?↓

Yes. Unlike VLOOKUP which requires the return column to be to the right of the lookup column, XLOOKUP uses separate lookup_array and return_array ranges, allowing you to return data located in any column or row.

What is the primary difference between XLOOKUP and VLOOKUP?↓

XLOOKUP defaults to an exact match (VLOOKUP defaults to approximate match), does not break when columns are inserted into the table, handles missing values gracefully with the if_not_found parameter, and supports both vertical and horizontal searches.

Why does XLOOKUP return a #VALUE! error?↓

The #VALUE! error in XLOOKUP happens when lookup_array and return_array have incompatible dimensions (for example, a 5-row lookup range paired with an 8-row return range). Ensure both arrays cover the exact same number of rows or columns.