Hernan_g_f
New Member
- Joined
- Jul 26, 2022
- Messages
- 22
- Office Version
- 365
- Platform
- Windows
Dear all,
I need to copy the last row of a matrix to the next row. How can I do it?
I wrote the following sentence:
Sub M16b()
Dim wb As Workbook
Set wb = Workbooks("SCDJ Excel VBA.xlsm")
Dim sh As Worksheet
Set sh = wb.Sheets("16b")
Dim rng1 As Range
Set rng1 = sh.Range("B17")
'---------
'2. Insert the last row
rng1.End(xlDown).Select
ActiveCell.EntireRow.Select
Selection.Copy
==> 'I need to copy the last row to the next row (down)
Selection.Paste '(¿?)
End Sub
Thanks in advance!!
I need to copy the last row of a matrix to the next row. How can I do it?
I wrote the following sentence:
Sub M16b()
Dim wb As Workbook
Set wb = Workbooks("SCDJ Excel VBA.xlsm")
Dim sh As Worksheet
Set sh = wb.Sheets("16b")
Dim rng1 As Range
Set rng1 = sh.Range("B17")
'---------
'2. Insert the last row
rng1.End(xlDown).Select
ActiveCell.EntireRow.Select
Selection.Copy
==> 'I need to copy the last row to the next row (down)
Selection.Paste '(¿?)
End Sub
Thanks in advance!!