In my workbook, I have a worksheet named ITEMS and another named PLANTS. I am trying to get an answer in ITEMS Cell O12, accessing a reference code in ITEMS Cell O12, and using that reference to look up a value in the second column of a vertical table in PLANTS. The syntax I have used is as follows :

Sheets("ITEMS").Range("O12") = Application. WorksheetFunction. VLookup(Sheets("ITEMS").Range("AD6"),Sheets("PLANTS").Range("B3:F65"), 2,FALSE)

I have looked up the use of the Vlookup function in VBA and the above appears to be correct, but I get an error 1004.

Can anyone find a way round that error?