I want to have a find and replace function that finds and replaces values on a sheet based a cell containing the find value and a cell containing the replace value.
At the moment i have
Sub update_month()
'
' update_month Macro
' Macro recorded 27/03/2007 by sbarber
'
'
Sheets("P&L - Sales").Select
ActiveCell.Offset(0, -4).Columns("A:A").EntireColumn.Select
ActiveCell.Offset(-25, -4).Range("A1").Activate
Selection.Replace What:="C[2]", Replacement:="C[3]", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
which will find C[2] and replace it with C[3] but i want both of the values to be entered into two cells on the work sheet rather than having to amend the code each time?
Bookmarks