I\'m currently working on a data set which is formatted as a table, with headers. What I need to do is cycle through all cells in a specific column and change the contents.
You can find the last column of table and then fill the cell by looping throught it.
Sub test() Dim lastCol As Long, i As Integer lastCol = Range("AZ1").End(xlToLeft).Column For i = 1 To lastCol Cells(1, i).Value = "PHEV" Next End Sub