I have a named range on sheet Competitor Comparison Data called “CCData”. I would like to add a new column to the end of the table every time I press a button. With each button press, a new column is added to the end of the range and is then included in the named range. The new column should retain the formatting of the previously column entirely. Here is a bit of code that I’ve tried to use but it’s not right.
Code:
Private Sub CommandButton1_Click()
With Sheets("Competitor Comparison Data").Range("CCData)+1 .EntireColumn.Insert
.Range("CCData)-1 .EntireColumn.Copy
.Range("CCData).EntireColumn.PasteSpecial Paste:=xlPasteFormats
End With
End Sub