請參考,檢查看看這是不是你要的:
For Each Rng In .Range("AZ1:CC1")
Rng.Value = Replace(Rng, "大", "小")
If Rng.Interior.ColorIndex = 43 Then
Rng.Interior.ColorIndex = 40
ElseIf Rng.Interior.ColorIndex = 8 Then
Rng.Interior.ColorIndex = 39
ElseIf Rng.Interior.ColorIndex = 37 Then
Rng.Interior.ColorIndex = 45
End If
Next