Hi Folks.
I am trying to get a macro to look at all the cells that show the word "match" in column E, and then copy the cells from B, C, and D from the same line to the bottom of another worksheet.
Here is the code I have so far:
Sheets("Comparison").Activate
rowcounter = Range("e65535").End(xlUp).Row
Dim i As Integer
Dim j As Integer
j = 1
If rowcounter < 1 Then Stop
For Each cell In Range("E2:E" & rowcounter)
i = 1
j = j + 1
If cell.Value = "Match" Then
Range("B" & j & ",C" & j & ",D" & j & ",E" & j).Copy _
Sheets("Extracted").Range("A65535").End(xlUp).Offset(1, 0)
End If
Next cell
It is PAINFULLY slow. There should be a way to just select all the cells at once and then copy over in one chunk, rather than copying one row at a time, but my VBA skill are "limited" to say the least.
Please help!
I am trying to get a macro to look at all the cells that show the word "match" in column E, and then copy the cells from B, C, and D from the same line to the bottom of another worksheet.
Here is the code I have so far:
Sheets("Comparison").Activate
rowcounter = Range("e65535").End(xlUp).Row
Dim i As Integer
Dim j As Integer
j = 1
If rowcounter < 1 Then Stop
For Each cell In Range("E2:E" & rowcounter)
i = 1
j = j + 1
If cell.Value = "Match" Then
Range("B" & j & ",C" & j & ",D" & j & ",E" & j).Copy _
Sheets("Extracted").Range("A65535").End(xlUp).Offset(1, 0)
End If
Next cell
It is PAINFULLY slow. There should be a way to just select all the cells at once and then copy over in one chunk, rather than copying one row at a time, but my VBA skill are "limited" to say the least.
Please help!