View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Unable to get the VLookup property of the WorksheetFunction class

Another way..

If WorksheetFunction.CountIf(Column1,c.Offset(0, 2).Value) 0 Then
varData = WorksheetFunction.VLookup(c.Offset(0, 2).Value, rngsStatusdata, 7,
0)
Else
'whatever
End If

If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

How do I go around this runtime error? I tried the following:

If Application.WorksheetFunction.VLookup(c.Offset(0, 2).Value,
rngsStatusdata, 7, False) < " " Then

If Application.WorksheetFunction.VLookup(c.Offset(0, 2).Value,
rngsStatusdata, 7, False) < "#N/A" Then

If Application.WorksheetFunction.VLookup(c.Offset(0, 2).Value,
rngsStatusdata, 7, False) < "#N/A" Then
trueOnAirWS.Range("J" & reportCurrentRow & "") =
Application.WorksheetFunction.VLookup(c.Offset(0, 2).Value, rngsStatusdata,
7, False)
End If