'copy values
For i = 1 To RowsA
For j = 1 To RowsB
If ws1.Cells(i, 1) = ws2.Cells(j, 1) Then
ws1.Rows(i).EntireRow.Copy
' insert data into cell Dcounter
ws3.cells(counter,4).value
counter = counter + 1
End If
Next j
j = 1
Next i
wbr Janos
Main Topics
Browse All Topics





by: webtubbsPosted on 2007-10-10 at 08:46:19ID: 20049528
Hi JAYRU,
ws3.Cells(counter, 1)
As it is at the moment, it's copying the entire row....
ws1.Rows(i).EntireRow.Copy
...so if the character is in col C in the 'Search criteria' sheet, it will be in col C of the 'Results' sheet.
Do you want it moved to column D, or in column C AND column D?
Regards,
Wayne