#2
X8212022-03-08 15:11
|
请大家帮我看看我写的这个程序哪里错了,应该如何修正,谢谢大家啦!具体代码如下:
Sub Mycode()
Dim rng As Range
With Worksheets(1).Range("2:2")
rng = .Find(what:=Worksheets(3).Range("D1").Value, lookat:=xlWhole)
If rng Is Nothing Then
rng.Interior.ColorIndex = 2
Else
rng.Interior.ColorIndex = Worksheets(3).Range("d1").Interior.ColorIndex
End If
End With
End Sub