Is this how you wanted?
Sub test()
    Dim r As Range
    With Sheets("sheet1").Cells(1).CurrentRegion
        .Value = .Parent.Evaluate(""" ""&" & .Address & "&"" """)
        For Each r In .Parent.Range("f1").CurrentRegion.Columns(1).Cells
            .Replace " " & r.Value & " ", " " & r(, 2).Value, 2
        Next
        .Value = .Parent.Evaluate("if(row(),trim(" & .Address & "))")
    End With
End Sub