I've copied this macro for conducting a multi find and replace across a selection. I've also attached a reduced version of the spreadsheet this applies to.
Sub MultiFindNReplaceNew()
Dim Rng As Range
Dim InputRng As Range, ReplaceRng As Range
xTitleId = "Test"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Owner Number Range ", xTitleId, InputRng.Address, Type:=8)
Set ReplaceRng = Application.InputBox("Territory Range ", xTitleId, Type:=8)
Application.ScreenUpdating = False
For Each Rng In ReplaceRng.Columns(1).Cells
InputRng.Replace what:=Rng.Value, replacement:=Rng.Offset(0, 1).Value
Next
Application.ScreenUpdating = True
End Sub
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
When the data in 'Sheet1:Owner Number' was instead a Zip Code (essentially a 5 digit number), the macro worked perfectly to replace the Zip Code in 'Registrations:ColumnB' with the appropriate name according to the name in 'Sheet1:ColumnB'
But now that I've put the Owner Number (a variable 1-4 digit number) the macro doesn't work.
It's taking an Owner Number like '45' and replacing it with the name "StecklerKoch" instead of "Goodman" as it should.
What am I missing?
Bookmarks