各位前輩大家好
請問大家,想把A欄的資料儲存格如果有包含F欄的資料就變成黃色,目前卡在抓F2欄位不會變色,,懇請各位幫忙,感謝..協助
Worksheets(1).Columns("A:A").Select
For d = 1 To 2
Selection.FormatConditions.Add Type:=xlTextString, String:= _
Range("F" & d), TextOperator:=xlContains
S = Range("F" & d)
MsgBox S
For i = 1 To 1
With Selection.FormatConditions(i).Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
On Error Resume Next
End With
Next
i = 0
Next d
'Selection.AutoFilter
'ActiveSheet.Range("$A$1:$A$5000").AutoFilter Field:=1, Criteria1:=RGB(255 _
' , 255, 0), Operator:=xlFilterCellColor
On Error Resume Next |