Excel – Using VLOOKUP()

excelexcel-formulavlookup

I am using Excel's VLOOKUP() first time and I am having hard time with it. Here is the screenshot:

enter image description here

I wrote a formula to cell B8; =VLOOKUP(C8, $A$2:$C$5, IF(C8 = "W", 2,3))

I was expecting as a result 1, but I am getting the wrong result 0.25. Am I doing something wrong?

Thanks for the help!

Best Answer

A vlookup looks for a value in the leftmost column of a table and then returns a value from the row that the searched for value is found (how far along that row is determined by you).

In your example situation, you need to add in the 4th part below (NearOrExact)

The vlookup formula consists of 4 parts:

1. SearchFor this is the value that is being searched for. 

2. WhereToSearch this is the range in which to search and in which the answer lives. 

3. WhichColumn this is the column in the WhereToSearch range which has the answer in it. 

4. NearOrExact you decide whether the vlookup should search for a close value or an exact value.

Structure of the vlookup formula: =vlookup ( SearchFor , WhereToSearch , WhichColumn , NearOrExact )

From <http://www.excelvlookuphelp.com/how-to-use-vlookup/>

Related Topic