Hello,
As the title suggests, I have a For Next loop that stops after the first loop. i am trying to copy the row of any cell that has that color in the cell. I have a work around with a do until but it takes almost 6 minutes to run. Will the For Next run faster? Also why does it stop after the first row?
Thank you
As the title suggests, I have a For Next loop that stops after the first loop. i am trying to copy the row of any cell that has that color in the cell. I have a work around with a do until but it takes almost 6 minutes to run. Will the For Next run faster? Also why does it stop after the first row?
Code:
lrow7 = Sheets("Combined").Cells(Rows.Count, "A").End(xlUp).Row
For Each a In Sheets("Combined").Range("C2:C" & Range("C40000").End(xlUp).Row)
If a.Interior.ColorIndex = 40 Then
lr = Sheets("Dupes").Cells(Rows.Count, "A").End(xlUp).Row + 1
a.EntireRow.Copy Destination:=Sheets("Dupes").Range("A" & lr)
a.EntireRow.Delete
End If
Next a
Thank you