M
Mike
I'm trying to use the formula below to replace the text in a formula
with the info from a variable.
Dim strg As String
strg = Range("D4").Text
Range("C7").Select
ActiveCell.Replace What:="Master Sample Data Form", Replacement:= _
"& strg &", LookAt:=xlPart, SearchOrder:=xlByColumns,
MatchCase:= _
False, SearchFormat:=False, ReplaceFormat:=False
In short it doesn't work, it places & strg & in the formual instead of
the variable information. I've also tried "strg" and strg (without
quotes) and non work. Does any one know how you might be able to
replace text in a formula with variable information?
Thanks!
Mike,
with the info from a variable.
Dim strg As String
strg = Range("D4").Text
Range("C7").Select
ActiveCell.Replace What:="Master Sample Data Form", Replacement:= _
"& strg &", LookAt:=xlPart, SearchOrder:=xlByColumns,
MatchCase:= _
False, SearchFormat:=False, ReplaceFormat:=False
In short it doesn't work, it places & strg & in the formual instead of
the variable information. I've also tried "strg" and strg (without
quotes) and non work. Does any one know how you might be able to
replace text in a formula with variable information?
Thanks!
Mike,