Reputation: 113
I have an excel sheet, sheet1 which has 2 cols, A and B. Col A has some values and has corresponding mapping in col B(not all values in A have a mapping in B, some are empty). The sorting is done from Z-A and w.r.to Col A. I have another excel sheet, sheet2 which has similar Col A and Col B. Now, i want to find out whether any match is there between Col A of sheet1 and Col A of sheet2. If matches are found, those values should be copied onto a new column.
Upvotes: 1
Views: 17269
Reputation: 14438
I thought I might give a better explanation because i didn't feel any of these were useful for me to personally figure out VLOOKUP
and this answer came up high on list of google when looking for VLOOKUP
Examples.
Here is my example which is looking up data from one worksheet to another:
=VLOOKUP(I2,Sheet1!$A$2:$Q$338,2,FALSE)
which is:
=VLOOKUP(<NEEDLE>,<HAYSTACK>,<COLUMN OF HAYSTACK TO PULL BACK INTO LOOKUP COLUMN>,<LEAVE AS FALSE>)
Steps:
<NEEDLE>
eg lookup_value
. This might be a list of cars<HAYSTACK>
eg table_array
. This is simply a selection of a range of which data to search through. It can be range within the current worksheet
, or a range on a different tab/worksheet
Haystack
of which column you would like returned as the value. eg col_index_num
I hope that helps someone else.
Upvotes: 1
Reputation: 91316
It is possible to do a lot with Excel and ADO: Excel VBA to match and line up rows
Upvotes: 0