Here is a minimal example of my Excel sheet:
GOAL: Column 1 and 2 will always be respectively "Number" and "Stand". I'm trying to rename the header in column C to the column left to the "TOTAL-column" (which can be in different positions). The names in the aforementioned range should be a counter, Such that the resulting header in the above example would be: Number, Stand, 1, 2, 3, 4, 5, 6, TOTAL.
ATTEMPT: This is what I got so far, however it isn't very efficient, to manually copy the replacement-line for each column, and it doesn't add a header in the empty columns
Sub Rename()
Dim WS As Worksheet
Dim MatchCase As Boolean
For Each WS In Worksheets
WS.Cells.Replace What:="1,", Replacement:="1", LookAt:=xlPart, MatchCase:=True
WS.Cells.Replace What:="2,", Replacement:="2", LookAt:=xlPart, MatchCase:=True
Next
End Sub
