worksheetfunction

  • Thread starter Thread starter GMet
  • Start date Start date
G

GMet

I get an error on this code:

LOEcriteria = Application.WorkSheetFunction.Vlookup(K4,'WBS
Code'!$A$2,$$d$40,4,0)

The error message highlights the single quote at 'WBS Code'

What do I need to do?

GMet
 
Glen,

Change

Application.WorkSheetFunction.Vlookup(K4,'WBS Code'!$A$2,$$d$40,4,0)

to

Application.WorkSheetFunction.Vlookup(Range("K4".Value,Worksheets("WBS
Code").Range("$A$2,$$d$40"),4,0)

HTH,
Bernie
MS Excel MVP
 
Arrrrrrgggg...

Forgot to close my parens.... and I didn't see your comma instead of a
colon in the second range....

Application.WorkSheetFunction.Vlookup(Range("K4").Value,Worksheets("WBS
Code").Range("$A$2:$$d$40"),4,0)

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top