SOLVED

VLOOKUP FORMULA

Copper Contributor

The formula VLOOKUP consists on this:
=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)).

Syntax
VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup])

Now, take a look at the image please, I took that image from
https://support.microsoft.com/en-us/office/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1


But my question is:

What if instead of putting
"=VLOOKUP(102,A2:C7,2,FALSE)"

You put
"=VLOOKUP(102,A1:C7,2,FALSE)"

So my question is...

What if you decide in the second argument to include the headings of the "table_array"... can you do that?

Can I include the headings of the table in the second argument? Or the formula SHOULD NOT include the headings of the table in the second argument?

Thanks.

Best regards.

9 Replies
best response confirmed by Miguel_Zafiro (Copper Contributor)
Solution
You should be able to include the headers if you want.

@Miguel_Zafiro , it's a non-issue. The VLOOKUP is just looking for the value 101 and will ignore the heading since it does not have the value 101. 

@JMB17 Hi!


Did you take a look at the image "1.png" i attached?

 

So the formula can work correctly, either if i decide to include the headers, or not?

 

Because I read a web page in spanish (because that is my native language), in which the person explained that the VLOOKUP formula CANNOT include the headers.

 

And it was after reading that, that i was no longer sure if the formula could work correctly, either if i decided to include the headers, or not.

 

But probably the person of that web page was just speaking carelessly without knowing what he was saying.

 

Thanks for you help

@TheAntony Hi!


Did you take a look at the image "1.png" i attached?

 

So the formula can work correctly, either if i decide to include the headers, or not?

 

Because I read a web page in spanish (because that is my native language), in which the person explained that the VLOOKUP formula CANNOT include the headers.

 

And it was after reading that, that i was no longer sure if the formula could work correctly, either if i decided to include the headers, or not.

 

But probably the person of that web page was just speaking carelessly without knowing what he was saying.

 

Thanks for you help

@Miguel_Zafiro , Correct, it will work either way. Can you post the link to the page where you read that? 

 

You can always test if this is true or not by including and excluding the headers and see if it makes a difference. 

@Miguel_Zafiro 

Perhaps the story is about Excel tables. If use something like =VLOOKUP(102,Table1,2,FALSE) headers are not included. But could be added if use =VLOOKUP(102,Table1[#All],2,FALSE) syntax. 

@TheAntony Hi!


I made a mistake, and i regret, but i cannot fix it.

 

I gave the best response to JMB17, but of a sudden I regretted, and i realized that the best response, in fact, should have been given to your response where you said

 

"@Miguel_Zafiro , Correct, it will work either way. Can you post the link to the page where you read that?

 

You can always test if this is true or not by including and excluding the headers and see if it makes a difference."

 

Please forgive me, that response of yours was in fact the best response, please forgive me, i did not take a wise decision.


I am afraid of giving you the link to the web page where that person explained not to include the headers in the VLOOKUP function, because i dont want that person (or that webpage, which is very useful to many people because it explains many many things of excel in a very useful way), to be harmed, sorry.

 

I followed your advice, i made experiments with VLOOKUP function, using the headers, and not using them, and functions perfectly either way.

 

Thanks, your help was very useful theantony, and please forgive me again for not giving the best response, to you, i feel really bad, you was the one who was replying to my replies, and not jmb17.

 

But i am going to ask another question related to the VLOOKUP function, i will try to send you the link, maybe you can help me again, and maybe this time i give you the "best response".

 

Have a nice day.

 

@Miguel_Zafiro , It's all right. :) Don't worry about it. Have a great day.

@TheAntony Hi!

 

TheAntony, I posted a new question about the VLOOKUP formula.

 

I am sending you the link, in case you want to help me with that other question. Thanks.

Have a great day!

 

https://techcommunity.microsoft.com/t5/excel/vlookup/m-p/1533900#M69194

1 best response

Accepted Solutions
best response confirmed by Miguel_Zafiro (Copper Contributor)
Solution
You should be able to include the headers if you want.

View solution in original post