Sub copy()
Range("A2").Value = "=IF(RC[1]="""","""",MAX(R[-1]C:R[-1]C)+1)"
Range("A2:M2").copy Range("A65536").End(xlUp).Offset(1)
Range("A2:M2").Select
Selection.ClearContents
End Sub
[此贴子已经被作者于2007-1-13 14:06:32编辑过]
作者: joyark 时间: 2007-1-13 22:05
問題以解決
謝謝
Sub mCopy()
Range("A2").Value = "=IF(RC[1]="""","""",MAX(R[-1]C:R[-1]C)+1)"
Range("a2:m2").copy Range("a65536").End(xlUp).Offset(1)
Range("b2:l2").ClearContents
mTimes = mTimes Mod 3 + 1
Range("b2:l2").Interior.ColorIndex = Choose(mTimes, "2", "27", "26")
End Sub
Sub copy1()
Range("A2").Value = "=IF(RC[1]="""","""",MAX(R[-1]C:R[-1]C)+1)"
Range("A2:M2").copy Range("A65536").End(xlUp).Offset(1)
Range("A2:M2").Select
Selection.ClearContents
If Cells.Interior.ColorIndex = 26 Then
Cells.Interior.ColorIndex = 2
ElseIf Cells.Interior.ColorIndex = 2 Then
Cells.Interior.ColorIndex = 27
ElseIf Cells.Interior.ColorIndex = 27 Then
Cells.Interior.ColorIndex = 26
End If
End Sub