I am trying to filldown the formulas in the 1st row of my table to multiple rows bellow that, but it's replacing the data in the cells bellow that. Ideally it should everything else down not overwrite it.
Sub SelectTableBody()
Dim rTableData As Range
Dim i, last As String
last = 5
For i = 1 To last
With ThisWorkbook.Worksheets(1)
Set rTableData = .ListObjects("Table1").DataBodyRange
Set rTableData = rTableData _
.Resize(i, rTableData.Columns.Count)
End With
Next
rTableData.FillDown
End Sub
I also tried this code:
resizeSh.ListObjects(tablename).ListRows.Add AlwaysInsert:=True
resizeSh.ListObjects(tablename).DataBodyRange.FillDown
It's giving me error, that the code is attempting to shift cells in my table... Is there a way to change the 1st line to get the last entry in the table and then insert the whole row for all columns, not only the table?
Maybe give this a try :
After Macro's execution will give :