1
With newexcel.Sheets("Analysis")
.Range("I1").AutoFilter Field:=9, Criteria1:="<>#N/A"
.Range("E1").AutoFilter Field:=5, Criteria1:="InActive"
.Range("D1").AutoFilter Field:=4, Criteria1:=(BLANK)
.AutoFilter.Range.SpecialCells(xlCellTypeVisible).Copy newexcel.Sheets("Test").Range("A1")
firstRow139 = .AutoFilter.Range.Offset(1).SpecialCells(xlCellTypeVisible).Row
End With
With newexcel.Sheets("Analysis").Range(newexcel.Sheets("Analysis").Cells(firstRow139, 4), newexcel.Sheets("Analysis").Cells(lastRow139, 4))
.Formula = "=VLOOKUP(A&firstRow139,'Test'!A:D,4,0)"
End With
は、あなたが式の"
一部外の変数firstRow139
を取る必要がありfirstRow139値VBAここでVLOOKUPでダイナミックレンジの問題