Sub test() On Error Resume Next For Each cell In Sheet1.UsedRange a = cell.Interior.ColorIndex
cell.Select
Selection.Font.ColorIndex = a
cell.Interior.ColorIndex = -4142
Next end sub本回答被提问者采纳
第2个回答 2014-02-07
Private Sub CommandButton2_Click() Dim rag As Range For Each rag In UsedRange rag.Font.ColorIndex = rag.Interior.ColorIndex rag.Interior.ColorIndex = -4142 Next End Sub