Forum Discussion
unable to apply the correct range to the column, "from which the values are accessed" by the VLOOKUP
- Jun 26, 2019
Hello learningexcel,
You would simply adjust your Lookup_value and Table_array accordingly. So cell E1 would contain the formula =Vlookup(D1,$A$1:$B$13,2,FALSE).
The 2 in this formula comes from the fact that you want to return the market value of the company that you are looking up. The market value in your Table_array is located in column 2 (the companies are located in column 1). This is where the 2 comes from.
Hopefully this all makes sense to you. Let me know if there are any other questions!
PReagan
PReagan Thank you for taking out time and posting the answer. However, I still have some doubts and if you can help in clearing up those:
1) How would the formula in the cell E1 look like , had there been "no headings for the data in Column A and Column B", that is, the headings, namely "Column 1 and Market value" were not present and the data actually started from the cells A1 and B1, extending till A13 AND B13 respectively. Also, suppose the that the data for which the values need to be found started from D1 and extended till D9.
Lastly, did not understand the significance of the highlighted part of your earlier answer, particularly for the correct application of the formula. Please refer to the attched picture.
Regards.
Ps: once you help me clear the above concepts, will certainly post the answer to the exercise u had given me. Thanks
Hello learningexcel,
You would simply adjust your Lookup_value and Table_array accordingly. So cell E1 would contain the formula =Vlookup(D1,$A$1:$B$13,2,FALSE).
The 2 in this formula comes from the fact that you want to return the market value of the company that you are looking up. The market value in your Table_array is located in column 2 (the companies are located in column 1). This is where the 2 comes from.
Hopefully this all makes sense to you. Let me know if there are any other questions!
PReagan
- learningexcelJun 27, 2019Copper Contributor
PReagan Thanks a lot in making me underdstand the significance of that 2. However, just to clear up my last confusion, ( if you do not mind :) ) and to have a crystal clear concept, suppose if I introduce a "new column" with some values between the "column A" and "column B", that is "column 1" and "market value", and considering the original posted scenario (as in the below picture):
Now, when I apply Vlookup in the cell E2 (for the picture/ scenario attched), considering that a column has been introduced between column A and column B, thus effectively shifting the existing column B to column C, shouldn't my Vlook up in cell E2 look like:
=VLOOKUP(D2, A2:C14,3,0) OR VLOOKUP(D2, A2:C14,3,1) for the exact and approximate matches repectively.
Since a new column has been introduced, the "market value" column (which haS NOW SHIFTED TO COLUMNC) , from which the VLOOKUP function is actually searching and accessing the correct value has shifted to number 3,hence the Bold 3 in the above VLOOKUP formula, is that correct?
Regards,
Learningexcel
- PReaganJun 27, 2019Bronze ContributorThat is correct!
- learningexcelJun 30, 2019Copper ContributorThank you so much @PRegan