I have the following code:
Sub test()
For Each Cell In Range("A3:A40")
If Selection.Interior.Colorindex = 34 Then
Rows(ActiveCell.Row).Select
Selection.Copy
Worksheets(1).Select
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteAllUsingSourceTheme, Operation:=xlNone _
, SkipBlanks:=False, Transpose:=False
End If
Next Cell
End Sub
This makes sense in my head, but it does not do anything. It runs without error, but it doesn't perform any actions.
There are cell in the range of A3:A40 that contain the interior colorindex 34, but the macro does not copy them, and it doesn't seem to be looping through anything.
Bookmarks