Hi all,
Hopefully a quick one. What is the easiest way to give the cell references of cells that are changed following a find and replace? The code below works fine, but I want to "report" the changes onto another sheet and just need the cell address.
Code
ThisWorkbook.Sheets("Data").Activate
Rw = 2
Do Until ThisWorkbook.Sheets("FindReplace").Cells(Rw, 1) = ""
ThisWorkbook.Sheets("Data").Cells.Replace What:=ThisWorkbook.Sheets("FindReplace").Cells(Rw, 1), Replacement:=ThisWorkbook.Sheets("FindReplace").Cells(Rw, 2), LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.StatusBar = "Finding rows containing '" & ThisWorkbook.Sheets("FindReplace").Cells(Rw, 1) & "' and replacing with '" & ThisWorkbook.Sheets("FindReplace").Cells(Rw, 2) & "' on Data sheet."
Rw = Rw + 1
Loop