Sugestão:Experimente utilizar a nova função PROCX, uma versão melhorada da função VLOOKUP que funciona em qualquer direção e devolve as combinações exatas por predefinição, o que torna a utilização mais fácil e conveniente do que a sua antecessora.
Utilize a função PROCV quando precisar de encontrar conteúdos numa tabela ou num intervalo por linha. Por exemplo, procure o preço de uma peça de automóvel através do número da peça ou encontre o nome de um funcionário com base no respetivo ID de funcionário.
De uma forma resumida, a função PROCV diz:
=PROCV(O que pretende procurar, onde pretende procurar, o número da coluna no intervalo que contém o valor a devolver, devolver uma combinação Aproximada ou Exata – indicada como 1/VERDADEIRO, ou 0/FALSO).
Sugestão:O segredo da PROCV é organizar os seus dados para que o valor que procura (Fruto) se encontre à esquerda do valor de retorno (Montante) que pretende encontrar.
Utilize a função PROCV para procurar um valor numa tabela.
Sintaxe
VLOOKUP (valor_proc, matriz_tabela, núm_índice_coluna, [intervalo_pesquisa])
Por exemplo:
-
=PROCV(A2,A10:C20,2,VERDADEIRO)
-
=PROCV("Rodrigues";B2:E7;2;FALSO)
-
=PROCV(A2,”Detalhes do Cliente”!A:F,3,FALSO)
Nome do argumento | Descrição |
---|---|
valor_proc (obrigatório) | O valor que pretende pesquisar. O valor que pretende pesquisar tem de estar na primeira coluna do intervalo de células que especificou no argumento damatriz_tabela. Por exemplo, se a matriz_tabela abranger as células B2:D7, então o seu valor_proc tem de estar na coluna B. O valor_proc pode ser um valor ou uma referência a uma célula. |
matriz_tabela (obrigatório) | O intervalo de células em que o PROCV irá pesquisar o Valor_proc e o valor de retorno. Pode utilizar um intervalo com nome ou uma tabela e pode utilizar nomes no argumento em vez de referências de célula. A primeira coluna do intervalo de células deve conter o valor_proc. O intervalo de células também tem de incluir o valor de retorno que pretende encontrar. Saiba como selecionar intervalos numa folha de cálculo. |
núm_indice_coluna (obrigatório) | O número da coluna (a começar em 1, na coluna mais à esquerda da matriz_tabela) que contém o valor de retorno. |
intervalo_pesquisa(opcional) | Um valor lógico que especifica se pretende que PROCV localize uma correspondência aproximada ou uma correspondência exata:
|
Como começar
Existem quatro informações de que irá precisar para criar a sintaxe da função PROCV:
-
O valor que pretende procurar, também designado valor de pesquisa (valor_proc).
-
O intervalo onde o valor de pesquisa se encontra. Lembre-se de que o valor de pesquisa deve encontrar-se na primeira coluna no intervalo para que a função PROCV funcione corretamente. Por exemplo, se o seu valor de pesquisa se encontrar na célula C2, o seu intervalo deve começar com C.
-
O número da coluna no intervalo que contém o valor devolvido. Por exemplo, se especificar B2:D11 como o intervalo, deverá contar B como a primeira coluna, C como a segunda e assim sucessivamente.
-
Opcionalmente, pode especificar VERDADEIRO se pretender uma correspondência aproximada ou FALSO para uma correspondência exata do valor devolvido. Se não especificar nada, o valor predefinido será sempre VERDADEIRO ou uma correspondência aproximada.
Agora experimente colocar tudo o que foi mencionado acima da seguinte forma:
=PROCV(valor de pesquisa, intervalo que contém o valor de pesquisa, o número da coluna no intervalo que contém o valor de retorno, Correspondência aproximada (VERDADEIRO) ou Correspondência exata (FALSO)).
Exemplos
Eis alguns exemplos da função PROCV:
Exemplo 1

Exemplo 2

Exemplo 3

Exemplo 4

Exemplo 5

Pode utilizar a ferramenta PROCV para combinar várias tabelas numa só, desde que uma das tabelas tenha campos em comum com todas as outras. Isto pode ser especialmente útil se precisar de partilhar um livro com pessoas que têm versões mais antigas do Excel que não suportam funcionalidades de dados com múltiplas tabelas como origem de dados – ao combinar as fontes numa tabela e alterar a origem de dados da funcionalidade de dados para a nova tabela, a funcionalidade de dados pode ser utilizada em versões mais antigas do Excel (desde que a própria funcionalidade de dados seja suportada pela versão mais antiga).
![]() |
Aqui, as colunas A-F e H têm valores ou fórmulas que utilizam apenas valores na folha de cálculo, e as restantes colunas utilizam a função PROCV e os valores da coluna A (Código de Cliente) e da coluna B (Advogados) para obter dados de outras tabelas. |
-
Copie a tabela que tem os campos comuns para uma nova folha de cálculo e dê-lhe um nome.
-
Clique em Dados > Ferramentas de Dados > Relações para abrir a caixa de diálogo Gerir Relações.
-
Para cada relação listada, observe o seguinte:
-
O campo que liga as tabelas (listadas entre parênteses na caixa de diálogo). Este é o valor_proc para a sua fórmula PROCV.
-
O nome da Tabela de Referência Relacionada. Esta é a matriz_tabela na sua fórmula PROCV.
-
O campo (coluna) na Tabela de Referência Relacionada que tem os dados que pretende na sua nova coluna. Esta informação não é apresentada na caixa de diálogo Gerir Relações - terá de consultar a Tabela de Referência Relacionada para ver o campo que pretende obter. Quer anotar o número da coluna (A=1) - este é o núm_índice_col na sua fórmula.
(Video) Como Fazer ProcV entre Duas Planilhas no Excel
-
-
Para adicionar um campo à nova tabela, introduza a sua fórmula PROCV na primeira coluna vazia utilizando as informações que recolheu no passo 3.
See AlsoI 6 Paesi più sicuri del Sud America per i viaggiatori: più 1 da evitare!spencer klavan boyfriend joshVivere all'Aia in Olanda: guida completa per trasferirsi25 città più ricche negli Stati UnitiNo nosso exemplo, a coluna G utiliza a função Advogados ( ovalor_proc) para obter os dados da Taxa de Faturação da quarta coluna (núm_índice_coluna = 4) da tabela da folha de cálculo Advogados, tblAttorneys ( a matriz_tabela), com a fórmula =PROCV([@Attorney],tbl_Attorneys,4,FALSO).
A fórmula também pode utilizar uma referência de célula e uma referência de intervalo. No nosso exemplo, seria =PROCV(A2,”Advogados”! A:D,4,FALSO).
-
Continue a adicionar campos até ter todos os campos de que precisa. Se estiver a tentar preparar um livro com funcionalidades de dados que utilizam várias tabelas, altere a origem de dados da funcionalidade de dados para a nova tabela.
Problema | O que correu mal |
---|---|
Valor devolvido errado | Se o intervalo_pesquisa é VERDADEIRO ou foi deixado de fora, a primeira coluna tem de ser ordenada por ordem alfabética ou numérica. Se a primeira coluna não está ordenada, o valor de retorno pode ter um resultado inesperado. Ordene a primeira coluna ou utilize FALSO para obter uma correspondência exata. |
#N/D na célula |
Para obter mais informações sobre como resolver erros #N/D na função PROCV, consulte Como corrigir um erro #N/D na função PROCV. |
#REF! na célula | Se núm_índice_coluna for maior do que o número de colunas na matriz_tabela, obterá um erro #REF! #VALOR! Para obter mais informações sobre como resolver um erro #REF! erros em PROCV, consulte Como corrigir um erro #REF!. |
#VALOR! na célula | Se a matriz_tabela for menor que 1, obterá o erro #VALOR! #VALOR! Para obter mais informações sobre como resolver erros #VALUE! na função PROCV, consulte Como corrigir um erro #VALOR! na função PROCV. |
#NOME? na célula | O valor de erro #NOME? normalmente significa que faltam aspas à fórmula. Para procurar o nome de uma pessoa, certifique-se de que utiliza aspas no nome na fórmula. Por exemplo, introduza o nome como "Rodrigues" em =PROCV ("Rodrigues";B2:E7;2;FALSO). Para obter mais informações, consulte Como corrigir um erro #NOME!.. |
Erros de #TRANSPOSIÇÃO! na célula | Este erro em específico #SPILL! normalmente significa que a sua fórmula está a depender da interseção implícita para o valor de referência, e a utilizar uma coluna inteira como referência. Por exemplo, =PROCV(A:A,A:C,2,FALSO). Pode resolver o problema ao ancorar a referência de procura com o operador @ da mesma forma: =PROCV(@A:A,A:C,2,FALSO). Em alternativa, pode utilizar o método PROCVtradicional e fazer referência a uma única célula em vez de uma coluna inteira: =PROCV(A2,A:C,2,FALSO). |
Faça o seguinte | Por que motivo |
---|---|
Utilize referências absolutas no intervalo_pesquisa | A utilização de referências absolutas permite-lhe preencher uma fórmula de forma a pesquisar sempre dentro do mesmo intervalo de pesquisa exato. Saiba como utilizar referências de célula absolutas. |
Não armazene valores de números ou datas como texto. | Ao procurar valores de números ou datas, certifique-se de que os dados na primeira coluna da matriz_tabela não estão armazenados como valores de texto. Caso contrário, o PROCV poderá devolver um valor incorreto ou inesperado. |
Ordene a primeira coluna | Ordene a primeira coluna da matriz_tabela antes de utilizar PROCV, quando o intervalo_pesquisa for VERDADEIRO. |
Utilizar carateres universais | Se intervalo_pesquisa for FALSO e valor_proc for texto, pode utilizar carateres universais —o ponto de interrogação (?) e o asterisco (*)— no valor_proc. Um ponto de interrogação corresponde a qualquer caráter individual. Um asterisco corresponde a qualquer sequência de carateres. Se pretender localizar um ponto de interrogação ou asterisco verdadeiro, escreva um til (~) à frente do caráter. Por exemplo, =PROCV("Fontan?",B2:E7,2,FALSO) irá procurar todas as instâncias de Fontana com uma última letra que pode variar. |
Certifique-se de que os seus dados não contêm carateres inválidos. | Ao procurar valores de texto na primeira coluna, certifique-se de que os dados da primeira coluna não têm espaços à esquerda, espaços à direita, utilização inconsistente de plicas ( ' ou " ) e aspas ( ‘ ou “) ou carateres não imprimíveis. Nestes casos, o PROCV pode apresentar um valor inesperado. Para obter resultados precisos, tente utilizar a função LIMPARB ou a função COMPACTAR para remover os espaços à direita após os valores de tabela numa célula. |
Precisa de mais ajuda?
Pode sempre colocar uma pergunta a um especialista da Excel Tech Community (Comunidade Tecnológica do Excel)ou obter suporte na Comunidade de Respostas.
Consulte Também
Cartão de Referência Rápida: atualizador da função PROCV
Cartão de Referência Rápida: sugestões de resolução de problemas do PROCV
Como corrigir um erro #VALUE na função PROCV
Como corrigir um erro #N/D na função PROCV
Descrição geral de fórmulas no Excel
Como evitar fórmulas quebradas
Detetar erros em fórmulas
Funções do Excel (por ordem alfabética)
Funções do Excel (por categoria)
PROCV (pré-visualização gratuita)
FAQs
What is the correct VLOOKUP formula? ›
=VLOOKUP(lookup value, range containing the lookup value, the column number in the range containing the return value, Approximate match (TRUE) or Exact match (FALSE)).
How do I do a VLOOKUP with multiple criteria? ›- Insert a Helper Column between column B and C.
- Use the following formula in the helper column:=A2&”|”&B2. ...
- Use the following formula in G3 =VLOOKUP($F3&”|”&G$2,$C$2:$D$19,2,0)
- Copy for all the cells.
VLOOKUP stands for Vertical Lookup. As the name specifies, VLOOKUP is a built-in Excel function that helps you look for a specified value by searching for it vertically across the sheet.
Why is VLOOKUP not picking up values? ›Problem: The exact match is not found
Solution: If you are sure the relevant data exists in your spreadsheet and VLOOKUP is not catching it, take time to verify that the referenced cells don't have hidden spaces or non-printing characters. Also, ensure that the cells follow the correct data type.
- Step 1: Organize the data. ...
- Step 2: Tell the function what to lookup. ...
- Step 3: Tell the function where to look. ...
- Step 4: Tell Excel what column to output the data from. ...
- Step 5: Exact or approximate match.
To make the VLOOKUP formula work correctly, the values have to match. If the problem is caused by text numbers in one place, and real numbers in another, do the following to fix the problem: convert the real number to text, so both values are text. or, convert the text value to a number, so both values are numbers.
What is Xlookup vs VLOOKUP? ›XLOOKUP vs VLOOKUP – Key Differences
XLOOKUP searches for data both horizontally and vertically. VLOOKUP searches only vertically. XLOOKUP can refer to the left of the lookup_value. It always looks up the values towards the right of the lookup_value.
VLOOKUP doesn't handle multiple columns. In the following example, if we wanted to find the match for both Movie and Showtime column, it wouldn't be possible with basic VLOOKUP syntax.
How do I extract multiple rows from matching criteria in Excel? ›- Select a cell in the dataset.
- Press CTRL + T.
- Press with left mouse button on check box "My table has headers".
- Press with left mouse button on OK button.
Spill means that a formula has resulted in multiple values, and those values have been placed in the neighboring cells. For example, =SORT(D2:D11,1,-1), which sorts an array in descending order, would return a corresponding array that's 10 rows tall.
How does H LOOKUP work? ›
Searches for a value in the top row of a table or an array of values, and then returns a value in the same column from a row you specify in the table or array. Use HLOOKUP when your comparison values are located in a row across the top of a table of data, and you want to look down a specified number of rows.
Is there an alternative to VLOOKUP? ›Here, we use lookup and Index Match as alternatives to VLOOKUP in Excel. The lookup function is better than VLOOKUP because it is less restrictive. It was first introduced in MS 2016. You can search data both vertically and horizontally.
Can VLOOKUP return text? ›Can VLOOKUP work with text as well as numbers? Yes. VLOOKUP can search for textual values just as well as it can search for numbers. The example above would search for the product names, which are text rather than numbers.
How do I learn basic VLOOKUP in Excel? ›- In the Formula Bar, type =VLOOKUP().
- In the parentheses, enter your lookup value, followed by a comma. ...
- Enter your table array or lookup table, the range of data you want to search, and a comma: (H2,B3:F25,
- Enter column index number. ...
- Enter the range lookup value, either TRUE or FALSE.
- Start Compare Two Sheets.
- Step 1: Select your worksheets and ranges.
- Step 2: Specify the comparing mode.
- Step 3: Select the key columns (if there are any)
- Step 4: Choose your comparison options.
The MATCH function searches for a specified item in a range of cells, and then returns the relative position of that item in the range. For example, if the range A1:A3 contains the values 5, 25, and 38, then the formula =MATCH(25,A1:A3,0) returns the number 2, because 25 is the second item in the range.
How do I VLOOKUP a number to text? ›If your lookup value is number format, and the ID number in the original table is stored as text, the above formula will not work, you should apply this formula: =VLOOKUP(TEXT(G1,0),A2:D15,2,FALSE) to get the correct result as you need.
How do I lookup a value and return another value in Excel? ›...
To pull values from another worksheet, we need to follow these steps:
- Select cell C3 and click on it.
- Insert the formula: =VLOOKUP(B3,'Sheet 2'!$ ...
- Press enter.
- For lookup_value (1st argument), use the topmost cell from List 1.
- For table_array (2nd argument), supply the entire List 2.
- For col_index_num (3rd argument), use 1 as there is just one column in the array.
- For range_lookup (4th argument), set FALSE - exact match.
The most commonly used LOOKUP functions in Excel are VLOOKUP and HLOOKUP. VLOOKUP allows you to search a data range that is set up vertically. HLOOKUP is the exact same function, but looks up data that has been formatted by rows instead of columns.
Is Xlookup more efficient than INDEX match? ›
Let's recap how XLOOKUP outperforms VLOOKUP and INDEX/MATCH: It is the simplest function, with only 3 arguments needed in most cases because the default match_mode is 0 (exact match). It's a single function, unlike INDEX/MATCH, so it's faster to type.
Why is VLOOKUP so popular? ›Excel's VLOOKUP function is more popular than the INDEX-MATCH function combination, probably because when Excel users need to look up data then a “lookup” function would be a reasonable choice to make.
Is there a limit to VLOOKUP columns? ›By default the maximum number of vlookup-function-calls-per-entity is 10. This can be increased to 20 with the assistance of Salesforce Support.
Can VLOOKUP return an array? ›What does it do? Searches for a value in the first column of a table array and returns the sum of values in the same row from other columns (to the right) in the table array.
How do you cross reference two lists in Excel and pull matching data? ›You can use the IF Function to compare two lists in Excel for matches in the same row. If Function will return the value TRUE if the values match and FALSE if they don't. You can even add custom text to display the word “Match” when a criterion is met and “Not a Match” when it's not met.
How do I extract multiple matches? ›This is an array formula and must be entered with Control + Shift + Enter. After you enter the formula in the first cell, drag it down and across to fill in the other cells. Note: this formula uses two named ranges: "names" refers to C4:C11, and "groups" refers to B4:B11.
How do you list all matched instances of a value in Excel? ›1. Select a blank cell to output the first matched instance, enter the below formula into it, and then press the Ctrl + Shift + Enter keys simultaneously. Note: In the formula, B2:B11 is the range which the matched instances locate in. A2:A11 is the range contains the certain value you will list all instances based on.
› All articles › VLOOKUP ›Using VLOOKUP on multiple columns | Excelchat
Advanced VLOOKUP in Excel: multiple, double, nested
VLOOKUP & MATCH - A Dynamic Duo
Parameters. VlookUp function takes four parameters. lookup value, table array, index number and range lookup.
What are the 4 arguments you give in VLOOKUP? ›VLOOKUP takes four arguments: lookup_value, table_array, column_index_num, and range_lookup. Lookup_value is the value to look for, and table_array is the range of vertical data to look inside. The first column of table_array must contain the lookup values to search.
How do I compare 4 columns in Excel using VLOOKUP? ›
- STEP 1: Select the cells (H8 and I8) where you want to insert the values from multiple columns.
- STEP 2: We need to enter the VLOOKUP function in the selected cell:
- STEP 3: We need to enter the first argument – Lookup_value.
- STEP 4: We need to enter the second argument – Table_array.
About the VLOOKUP function
The value you want to look up; The range in which you want to find the value and the return value; The number of the column within your defined range, that contains the return value; 0 or FALSE for an exact match with the value your are looking for; 1 or TRUE for an approximate match.
2 – Once the function spots Brad's name, it will go to the second column of the array, and return the value in the same row as that of Brad. The value 2 here indicated that we are looking for the score from the second column of the specified array. 0 – this tells the VLOOKUP function to only look for exact matches.
Can VLOOKUP return formula? ›VLOOKUP sometimes returns the formula in the cell instead of the value. I resolve it by formatting the cell as General or Number depending on what I'm looking up, then click fx again to reopen the function arguments box, then click OK.
How do you VLOOKUP with text data? ›Open VLOOKUP & TEXT function together in cell E3 and select the lookup value as cell D3. In order to convert the number value to text, mention the format text argument as zero (0). After applying the VLOOKUP Formula answer is shown below.
How do I use a VLOOKUP to find a match from another sheet? ›- Open both files.
- Start typing your formula, switch to the other workbook, and select the table array using the mouse.
- Enter the remaining arguments and press the Enter key to complete your formula.