jagadeesh.rt
New Member
Can any please.......ASAP..
increment row number using variable
If the data is available in the rst, the result should add to the existing data and increase rows by pasting the result
Code works :
sheet lst values (column A) mapped with sheet checks value (column I) - IF MATCHED, range should be copied from A:O and the result should pasted in rst sheet name (as same copied without any changes).
If data available : find the last row and add to the existing data.
Below code working fine : up to pastespecial....
my request : increment row number using variable
If the data is available in the rst, the result should add to the existing data and increase rows by pasting the result
Please find the attachment for sample workbook.
Thank You.
increment row number using variable
If the data is available in the rst, the result should add to the existing data and increase rows by pasting the result
Code works :
sheet lst values (column A) mapped with sheet checks value (column I) - IF MATCHED, range should be copied from A:O and the result should pasted in rst sheet name (as same copied without any changes).
If data available : find the last row and add to the existing data.
Below code working fine : up to pastespecial....
my request : increment row number using variable
If the data is available in the rst, the result should add to the existing data and increase rows by pasting the result
Code:
Sub test3()
Dim x As Integer, y
Dim s As Integer, j
x = Sheets("lst").Range("a" & Rows.Count).End(xlUp).Row
s = Sheets("checks").Range("I" & Rows.Count).End(xlUp).Row
a = 1
For y = 1 To x
For j = 1 To s
If Sheets("lst").Cells(y, 1) = Sheets("checks").Cells(j, 9) Then
a = a + 1
Sheets("checks").Range("A" & j & ":O" & j).Copy
Sheets("rst").Range("A1").PasteSpecial
End If
Next j
Next y
End Sub
Please find the attachment for sample workbook.
Thank You.