Reputation: 59
I've been trying to compare 2 sheets and update one of the sheets with some info. I know about vlookup but I don't understand how it works.
Here is what I need to do:
Sheets("Product") has many products on the A column (over 8,000)
If there is a match on the Sheets("Parker List") I need to take SOME of the values of the Sheets("Parker List") and put them into Sheets("Product")
If there is no match, I need to go to the next number in line in sheets("Product")
The values switch are: From Sheets("Parker List") I need "B" and "S" and than put the infos in respectively "F" and "H" of the sheets("Product") ONLY if the products of sheets("Product") are found in Sheets("Parker List").
Upvotes: 0
Views: 763
Reputation: 157
If for example the product name is in column A in both sheets, you could use something like this in column F of Sheets("Product") to get the appropiate value from column B of Sheets("Parker List") :
=IF(ISERROR(MATCH(A1,'Parker List'!A:A,0)),"",INDEX('Parker List'!B:B,MATCH(A1,'Parker List'!A:A,0)))
The key to this is to use 0 as the third optional argument of the MATCH function which will return an error value when a match is not made. ISERROR will detect this error and the IF function will perform the required calculations accordingly.
Upvotes: 2