VBA VLOOKUP - "Run-time Error 1004: Unable to get the Vlookup property of the WorksheetFunction class."

Thank you for looking at my question,

I have read through the answers already on EE regarding and not found what I need so, simply, how do I incorporate the statement below in VBA

=IF(ISERROR(VALUE($I$2)),VLOOKUP($I$2,'O:\Materials Data\VZ Interpreter\[VZOptions.xlsx]Material'!$A$1:$C$10,3,FALSE),VLOOKUP(VALUE($I$2),'O:\Materials Data\VZ Interpreter\[VZOptions.xlsx]Material'!$A$1:$C$10,3,FALSE))
Gary CroxfordOperations Support AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ShumsDistinguished Expert - 2017Commented:
You can try as below changing activecell:
ActiveCell.FormulaR1C1 = "=IF(ISERROR(VALUE(R2C9)),VLOOKUP(R2C9,'O:\Materials Data\VZ Interpreter\[VZOptions.xlsx]Material'!R1C1:R10C3,3,FALSE),VLOOKUP(VALUE(R2C9),'O:\Materials Data\VZ Interpreter\[VZOptions.xlsx]Material'!R1C1:R10C3,3,FALSE))"

Open in new window

0
Rgonzo1971Commented:
HI,

pls try
res = Evaluate("=IF(ISERROR(VALUE($I$2)),VLOOKUP($I$2,'O:\Materials Data\VZ Interpreter\[VZOptions.xlsx]Material'!$A$1:$C$10,3,FALSE),VLOOKUP(VALUE($I$2),'O:\Materials Data\VZ Interpreter\[VZOptions.xlsx]Material'!$A$1:$C$10,3,FALSE)) ")
If Not IsError(res) Then 'yourcode

Open in new window

Regards
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MacroShadowCommented:
If you get runtime error 1004, instead of using
WorksheetFunction.VLookup

Open in new window

use
Application.VLookup

Open in new window

0
Gary CroxfordOperations Support AnalystAuthor Commented:
Great, thank you for your help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.