seragrefaat
Board Regular
- Joined
- Nov 16, 2020
- Messages
- 53
- Office Version
- 365
- Platform
- Windows
I want to use this make a vba code that fill a the last column in a table with a simple formula like below:
how to do this?
and how to fill all cells in the column with the same formula?
and how to rename the header of this column?
All in VBA code
Thanks
VBA Code:
ActiveSheet.ListObjects("Table1").ListColumns.Add
Cells(1, Columns.Count).End(xlToLeft).Offset(1).Select
ActiveCell.FormulaR1C1 = "=COUNTBLANK(The range here should be 2nd cell in row 2 to the last cell before the active cell with the formula)"
and how to fill all cells in the column with the same formula?
and how to rename the header of this column?
All in VBA code
Thanks