Sub ro()
Dim ii, jj As Integer
Dim AA, TT As Object
Set AA = Workbooks("論文總檔.xlsx").Worksheets("總財務資料(目標)")
Set TT = Workbooks("目標財務資料.xlsm").Worksheets("工作表1")
For ii = 3 To 2000
AA.Select
Columns(B).Select
Set cusip = Cells.Find(What:=TT.Cells(ii, 6), LookIn:=xlFormulas).Activate
If cusip Is Nothing Then MsgBox "查無資料" Else
AA.Select
Range(Cells(1, 3), Cells(1, 40)).Select
Cells.Find(What:=TT.Cells(ii, 2), After:=ActiveCell, LookIn:=xlFormulas).Offset(1, 0) = TT.Cells(ii, 7)
End If
Next ii
End Sub
執行卻出現錯誤訊息: 有END IF 卻沒有 IF
請問該如何解決呢?