Gurus, this is a 3 part question, please bear with me.
1. I have a table with 13 columns but if I insert a new column in between 2 columns. It gives me really random header names like "column 62", "column 51" etc. Isn't it supposed to be "column 14"?
2. Anyways thats not so important because im gonna change the name of the header regardless. The thing is that I only know ------
ActiveWorkbook.Sheets("").ListObjects("").ListColumns("Column name").Name = "New column name" , to change the name of the header. Now that I only know the relative position of the column. How do I do it?
3. how do I pass down a formula to the whole column? This is what i recorded:
ActiveCell.FormulaR1C1 = _
"=[@Column6]+TIME(,VLOOKUP([@Column3],flight_arrival_adjust,2,0),)"
i think i only need to change the left side as right side contains a passing down formula but not sure how.
1. I have a table with 13 columns but if I insert a new column in between 2 columns. It gives me really random header names like "column 62", "column 51" etc. Isn't it supposed to be "column 14"?
2. Anyways thats not so important because im gonna change the name of the header regardless. The thing is that I only know ------
ActiveWorkbook.Sheets("").ListObjects("").ListColumns("Column name").Name = "New column name" , to change the name of the header. Now that I only know the relative position of the column. How do I do it?
VBA Code:
Selection.ListObject.ListColumns.Add Position:=7
3. how do I pass down a formula to the whole column? This is what i recorded:
ActiveCell.FormulaR1C1 = _
"=[@Column6]+TIME(,VLOOKUP([@Column3],flight_arrival_adjust,2,0),)"
i think i only need to change the left side as right side contains a passing down formula but not sure how.