1
我想在下面的代码中给出一个范围而不是偏移量。以下代码将范围(C5:F11)中的颜色复制到偏移i集,但我想指定范围(如M5:P11)。我试着简单地用范围替换偏移量,但它不能正常工作。请帮助如何指定范围而不是偏移量,excel VBA?
Sub MatchColors2()
For Each myCellColor In Range("C5:F11")
myCellColor.Offset(0, 8).Interior.ColorIndex = myCellColor.Interior.ColorIndex
Next
End Sub
感谢
+ 1挨打! ;( –
谢谢,它的工作完美 –
@SiddharthRout,这是一个罕见的事件! –