Macro to replace file name in linking formula
col = 3
NameOld = Cells(4, 1)
Do
NameNew = Cells(1, col)
Cells(2, col).Replace What:=NameOld, _
Replacement:=NameNew, LookAt:=xlPart, _
SearchOrder:=xlByColumns, MatchCase:=False, _
SearchFormat:=False, ReplaceFormat:=False
col = col + 1
Loop Until Cells(2, col) = ""
Hth,
Merjet
|