If you have a list of the incorrect headers in column A and the corresponding correct ones in column B, same row of sheet 1 then the headers in sheet 2 can be corrected like this:
If there are no incorrect headers on the sheet it simply ignores everything and ends the procedure. In other words it will only correct somethig if it finds a match.![]()
Sub t() Dim c As Range Set ws1 = Sheets(1) Set ws2 = Sheets(2) For Each c In ws1.Range("A2", ws1.Cells(Rows.Count, 1).End(xlUp)) ws2.Rows(1).Replace c.Value, c.Offset(, 1).Value Next End Sub
Bookmarks