0

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:

  1. Sheets("Product") has many products on the A column (over 8,000)

    • I need to select all products 1 by 1 and try to find if there is an EXACT MATCH (LookAt:=xlWhole) on the Sheets("Parker List").
  2. 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")

  3. 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").

1 Answer 1

2

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.

9
  • If there is no match in Sheets("Parker List") then I need to continue on the next line on Sheets("Product")
    – Konsume
    Mar 25, 2015 at 14:57
  • 1
    What do you mean that you need to continue on the next line? Do you mean that you take the values according to the product name on the next line?
    – Guy Hodges
    Mar 25, 2015 at 14:59
  • I need to search value of my sheet and find the same value on the other sheet. IF there is no EXACT MATCH on the 2nd sheet, than noting has to be updated. If there is an EXACT MATCH, than I need to take the value of B and S of the 2nd sheet and put in respectively in the F and H column of the 1st sheet
    – Konsume
    Mar 25, 2015 at 15:02
  • 1
    Are there a pre-existing values in columns F and H that you wouldn't want to lose if there is no exact match? or is it blank?
    – Guy Hodges
    Mar 25, 2015 at 15:08
  • 1
    I've edited the formula so that it will leave a blank value if there is no exact match. Give this a try and see if it works for you.
    – Guy Hodges
    Mar 25, 2015 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.