Hi - I have this code to copy rows to another sheet. I thought I could extend the range by add this code. But no, any suggestions on how I include the extra columns in the copy range?
Tried this
Tried this
Code:
ws1.Range((ws1.Cells(thisRowA, "B"), ws1.Cells(thisRowA, "H")), (ws1.Cells(thisRowA, "K"), ws1.Cells(thisRowA, "O"))).Copy
Code:
Do While thisRowA <= lastRowA
foundRow = Application.Match(ws1.Cells(thisRowA, "B").Value, ws2.Range("A:A"), 0)
If IsError(foundRow) Then
thisRowA = thisRowA + 1
Else
ws1.Range(ws1.Cells(thisRowA, "B"), ws1.Cells(thisRowA, "H").Copy
ws3.Cells(nextRowA, "A").PasteSpecial Paste:=xlPasteValues
nextRow = nextRow + 1
ws1.Range(ws1.Cells(thisRowA, "B"), ws1.Cells(thisRowA, "O")).ClearContents
lastRowA = lastRowA - 1
End If
Loop
Last edited: