2005-04-14

[Computer] VBA 判斷文字是否相同

Sub Macro1()

Dim rwIndex As Integer
For rwIndex = 2 To 1346
If Cells(rwIndex, 4) = "" Then
Cells(rwIndex, 4) = Cells(rwIndex, 2)
Else Cells(rwIndex, 4).Select
Selection.Font.ColorIndex = 3
End If
Next rwIndex

End Sub

沒有留言: