将突出显示的单元格从表格复制到另一个单元格时出现问题,它总是跳过一列,我完全不知道问题
以下是代码:
Sub CopyCat()
ActiveSheet.Unprotect Password:="P@ssw0rd"
Dim LR As Long, i As Long, j As Long
Dim c As Range
j = 1
LR = Range("A" & Rows.Count).End(xlUp).row
For Each c In Worksheets("MB").Range("A15:O" & LR)
If c.Interior.ColorIndex = 3 Then
c.Copy Destination:=Worksheets("MB").Range("J" & j)
j = j + 1
End If
Next c
ActiveSheet.Protect Password:="P@ssw0rd"
End Sub
请帮助我!!