Sub テスト()
Dim i As Long
For i = 2 To Cells(Rows.Count, 2).End(xlUp).Row
If Cells(i, 4) <>"" And Cells(i, 2) <> Cells(i, 4) Then
Cells(i, 3).Interior.ColorIndex = 3
End If
Next i
End Sub
Sub テスト()
Dim i As Long
For i = 2 To Cells(Rows.Count, 2).End(xlUp).Row
If Cells(i, 4) <>"" And Cells(i, 2) <> Cells(i, 4) Then
Cells(i, 3).Interior.ColorIndex = 3
End If
Next i
End Sub