View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
merjet merjet is offline
external usenet poster
 
Posts: 812
Default Macro to replace file name in linking formula

row = 6
NameOld = Cells(4, 1)
Do
NameNew = Cells(row, 1)
Cells(row, 2).Replace What:=NameOld, _
Replacement:=NameNew, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, _
SearchFormat:=False, ReplaceFormat:=False
row = row + 1
Loop Until Cells(row, 2) = ""

Hth,
Merjet