jawaharprm
Member
Hi All,
I have done a macro file that in sheet2 i have 7 digits that should repeat copy and paste in sheet1 at column B with refer the last row of column A, Pls help on same.
i have enclosed sample file for reference also.
I have done a macro file that in sheet2 i have 7 digits that should repeat copy and paste in sheet1 at column B with refer the last row of column A, Pls help on same.
i have enclosed sample file for reference also.
Code:
Sub copy_Paste()
Dim y As Workbook
Dim lr1, lr2, lr3 As Long
Dim ws As Worksheet
Set y = ThisWorkbook
y.Activate
lr2 = .Range("A" & .Rows.Count).End(xlUp).Row
Sheets("Sheet2").Select
Range("A2:A8").Select
Selection.Copy
Sheets("Sheet1").Select
Range("B5:B" & .Rows.Count).Select
ActiveSheet.Paste
End Sub