Hi, I'm new to this and hoping someone can help me.
This macro is in a template and then is in each file it generates, each file can be in various locations. I need my macro to copy a file path and replace it with a file path that changes depending on where the file is located. So, for example I need path e:whatever/blank/whatever to be replaced with the file path that is in cell BC14. Below is what I have so far. Hopefully that makes sense?
Sub Macro1()
'
' Macro1 Macro
Range("BC13").Select
Selection.Copy
Range("BC14").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("BC14").Select
Range("K10:K25").Select
Selection.Replace What:= _
"constant file path" _
, Replacement:= _
"a file path that changes (needed path is in BC14)" _
, LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat _
:=False, ReplaceFormat:=False
Application.Goto Range("b2"), Scroll:=True
End Sub
Bookmarks