Hi,
I need help creating a macro that will do the following:
1) Copy Cell A1
2) Perform the Find and Replace function, in which the Replace value is the copied value from cell A1.
Side Note: The value I want to "Find" would be a static value, so I would just build that into my macro, but the "Replace" value changes.
Here's what I have so far, but it's not working....
Sub MyMacro()
Range("A1").Select
Selection.Copy
Cells.Replace What:="Static Value", Replacement:=ActiveSheet.Paste, LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
Thanks!
Last edited by gjohn282; 06-16-2011 at 06:06 PM.
try this, it should work.
PierreSub MyMacro() Range("A1").Select Selection.Copy Cells.Replace What:="Static Value", Replacement:=Range("A1"), LookAt:= _ xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False End Sub
Thank you so much! This worked perfectly!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks