- Jul 24, 2018
- Office Version
I have a macro that adds a new row to a table. It will copy the formula correctly in column A but it doesnt in column B. I dont know why it is doing this.
Sub AddRow() Dim ws As Worksheet Set ws = ActiveSheet Dim tbl As ListObject Set tbl = ws.ListObjects("PayData") 'add a row at the end of the table tbl.ListRows.Add 'add a row as the fifth row of the table (counts the headers as a row) 'tbl.ListRows.Add 5 End Sub