Sub yy()
Dim x$, i%, c As Range
x = "QWERT"
With [c:c]
For i = 1 To 5
Set c = .Find(Mid(x, i, 1), [c65536], , 1)
If Not c Is Nothing Then
d = c.Address
Do
c(1, -1).Resize(, 3).Interior.ColorIndex = i + 2
Set c = .FindNext(c)
Loop Until c.Address = d
End If
Next
End With
End Sub作者: GBKEE 時間: 2011-4-19 17:06
Sub yy()
Dim x$, i%, c As Range
x = "QWERT"
For Each c In Range("c:c").SpecialCells(xlCellTypeConstants)
i = InStr(x, UCase(c))
If i Then c(1, -1).Resize(, 3).Interior.ColorIndex = i + 2
Next
End Sub作者: mark15jill 時間: 2011-4-20 10:28