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.
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
Here is my example which is looking up data from one worksheet to another:
=VLOOKUP(<NEEDLE>,<HAYSTACK>,<COLUMN OF HAYSTACK TO PULL BACK INTO LOOKUP COLUMN>,<LEAVE AS FALSE>)
- Select the column which is looked up as the
lookup_value. This might be a list of cars
- Then select the entire range of the data you want to search within as
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
- give a number which is index of column in the
Haystackof which column you would like returned as the value. eg
- supply “false” as final paramater. this should always be false at least in the cases I’ve used it.
I hope that helps someone else.
It is possible to do a lot with Excel and ADO: Excel VBA to match and line up rows