Excel has something called VLOOKUP to offer. If your work involves lot of analysis then VLOOKUP and Pivot table can help you a lot.
This function is the most popular among the so called geek community! :P
Nobody can deny that it reduces your work to half or even lesser.
Quantitatively you will spend less on a table full of numbers and Qualitatively you will have more time to learn new things or spend time on something good.
Anyway going back
Goal: Use VLOOKUP on a table
Solution:
1. It is always advisable to use the TRIM function to remove all the trailing spaces.
2. Here is my data table as seen in excel
Table with data
Now, I want to get the additional details about the subjects that each student has opted for. This data is present in another table (Sheet2) in the below form.
Another Table with additional data on the subject opted
3. Lets use VLOOKUP now!! How do we do that?
Simple, create a column named Subject in the first sheet. Done!!
Now, copy and paste the formula (you can type it as well to learn it better) =VLOOKUP(A2,Sheet2!A:C,3,FALSE).
Eureka! Tom has opted for Maths! But how exactly this works?
Answer is simple.
VLOOKUP stands for Vertical Lookup. The formula requires the value (contained in cell A2) that you want to lookup in the table containing the desired data (in our example data related to the subject is in the second table). But how would excel know that we require data related to the third column, i.e. Subject. For that we need to enter the column number which is the third field in the formula. The last field tells excel whether we want an approximate match or exact match. False means I want the Exact match. Vertical Lookup is for extracting the data from the desired column of the table.
We can use VLOOKUP to extract the desired data from the table containing it. If I have the data related to the students belonging to all the standards and I want to extract the data related to the students belonging to the first standard then I can use VLOOKUP to get the desired details.
Lets see the output for the entire table after dragging the fill handle.
Final Table with the subject data extracted!
Now we have the required data with us! This was just the basic tutorial related to VLOOKUP. There is more to it!! The next lesson/tutorial will give you the exact data in a more effective and reliable way.



very Informative...
ReplyDelete