VBA Macros to insert a row at the end of a table, then paste values of previously copied lines in a specific range of the new row

lbradbury

New Member
Joined
May 14, 2020
Messages
31
Office Version
  1. 365
Platform
  1. Windows
I'm looking for help on a VBA Macros. This is my current code. Where the **** are I need some code to insert a row at the end of the table on the active worksheet, and then paste the values copied in the above code with the range of ("E1:R8") into the range (E?:R?") of the newly created row.

VBA Code:
`Sub Workbook()

Dim wb As Workbook
Set wb = Workbooks.Add

ThisWorkbook.Sheets("RFP Form").Copy Before:=wb.Sheets(1)
ThisWorkbook.Sheets("DataHelperSheet").Copy After:=wb.Sheets(1)
Application.DisplayAlerts = False

wb.SaveAs "Z:\Temp\test3.xlsx"

Application.DisplayAlerts = True

ActiveWorkbook.SaveAs FileName:="Z:\Temp\" & Range("I1").Value

Worksheets("DataHelperSheet").Activate
Range("E1:R8").Select
Selection.Copy

Workbooks("Proposal Quote Master List(LB).xlsm").Activate
Worksheets("Master List").Activate
***

Range("E1:R298").PasteSpecial Paste:=xlPasteValues


End Sub
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
50,929
Office Version
  1. 365
Platform
  1. Windows
How about
VBA Code:
Range("E" & Rows.Count).End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues
 

Watch MrExcel Video

Forum statistics

Threads
1,118,862
Messages
5,574,713
Members
412,613
Latest member
EFRATA
Top