I'm trying to create a macro in Excel that will add three columns to the end of the chart, identical to the previous columns found in the chart with one of the columns increasing by one.
Column 1 Column 2 Column 3 Column 4 Column 5 Column 6
PGM Number 1 Amount Notes PGM Number 2 Amount Notes
Is there a way to add three columns (PGM Number +1, Amount and Notes) at the end of the chart, so it can do the following?
Column 7 Column 8 Column 9 Column 10 Column 11 Column 12
PGM Number 3 Amount Notes PGM Number 4 Amount Notes
This is the code I have to replicate the last column:
Dim lastColumn As Long
lastColumn = ActiveSheet.Range("A1").SpecialCells(xlCellTypeLastCell).Column
Columns(lastColumn).Copy Destination:=Columns(lastColumn + 1)
But obviously this is not enough.
Thank you for your help!