excel中当a1单元格填充颜色的时候 a2单元格自动填充同样的颜色

2025-05-05 08:36:46
推荐回答(1个)
回答1:

这个要用VBA处理。

Sub Macro1()
If Cells(1, 1).Interior.ColorIndex <> -4142 Then
    Cells(1, 2).Interior.ColorIndex = Cells(1, 1).Interior.ColorIndex
End If
End Sub