Tables not updating my formula - may be a VBA issue


Board Regular
Sep 20, 2017
I have a table where I insert a line and then copy and paste the previous line as a value as the data is being fed to the table from another worksheet.

I use this code but can't figure out my error as I've updated the formulas in the table yet when I insert a line it's not keeping the updates, it reverts back to the old formulas?

This is the code that I'm using:

Dim n As Long
With ActiveSheet.ListObjects("Table927")
.ListRows.Add AlwaysInsert:=True
n = .DataBodyRange.Rows.Count
.ListRows(n - 1).Range.Copy
.ListRows(n - 1).Range.PasteSpecial xlValues
End With
Application.CutCopyMode = False


Well-known Member
Jul 8, 2002
Can you please step through the code, while watching the sheet, and see if the code is doing what you think it is doing?

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...