excel VBA编辑,点击按钮,找出当前整个sheet中的绿色单元格,然后变为白色

2025-04-30 00:48:14
推荐回答(1个)
回答1:

Sub 绿色变为白色()
Dim rng
For Each rng In Range("a1:z100")
If rng.Interior.ColorIndex = 10 Then
rng.Interior.ColorIndex = 2
End If
Next
End Sub
查找区域为A1:Z100,根据实际修改