I have a complex that is doing alot of copy pasting to different files, however, I am getting an error on the following line and error is object doesn't support this property or method
.Range("Q" & i).Value="if(P" & i & "=" & Chr(34) & "Y" & Chr(34) & ",vlookup(A" & i & "," & OutShVar & "!$A:$BP,68,0)," & Chr(34) & "Not Available" & Chr(34) & ")"
(I am copy pasting parts that are relevant to the question.)
Set OutShVar=ThisWorkbook.Worksheets("MasterReport")
Set RngConcat=OutShVar.Range("A:A")
Set wMain=Workbooks.open(ForePath & sfn)
Call OpenLink 'Performs tasks on another report after opening it
'After doing a bunch of things on the OpenLink report,
'i want to do a vlookup on that report that will take things from the excel
'workbook where the macro is i.e., OutShVar and RngCon'
'On Master list/Refresh
if .Range("P" & i).Value = "N" Then
.Range("Q" & i).Value="Not inscope"
Else
If not IsError(Application.Match(.Range("A" & i).Value,RngConcat,0) Then
.Range("Q" & i).Value="if(P" & i & "=" & Chr(34) & "Y" & Chr(34) & ",vlookup(A" & i & "," & OutShVar & "!$A:$BP,68,0)," & Chr(34) & "Not Available" & Chr(34) & ")"
'This is where the problem is, not sure if this is right way to do the vlookup?