我收到了編譯錯誤消息 - End If without If Block
。任何人都可以告訴我的代碼有什麼問題:IF語句編譯錯誤
Sub Find()
Dim i As Integer
Dim j As Integer
Dim k As Integer
For i = 2 To 107
For j = 4 To 6
For k = 2 To 573
If InStr(Sheet2.Cells(k, 7), Sheet1.Cells(i, j)) <> 0 Then Sheet2.Cells(k, 12) = Sheet2.Cells(k, 9)
End If
Next k
Next j
Next i
End Sub
兩個選項:1)去除'結束If',或2)寫'Sheet2.Cells(K,12)= Sheet2中.Cells(k,9)'換行 –