Hi Guys,
New at loops here, this is copying the data I need to a new sheet but it's all landing in the same two cells and overwriting the previous data instead of skipping to the next row down each time before pasting the next.
New at loops here, this is copying the data I need to a new sheet but it's all landing in the same two cells and overwriting the previous data instead of skipping to the next row down each time before pasting the next.
Code:
Sub TestSub()Dim iCell As Range
Lastrow = Sheet6.UsedRange.Rows.Count
For Each iCell In Range("A2:BD3")
If iCell.Interior.ColorIndex = 35 Then
Sheet6.Cells(Lastrow, 1).Value = iCell.Text
Sheet6.Cells(Lastrow, 1).Offset(0, 1).Value = iCell.Offset(0, 1).Text
End If
Next iCell
End Sub