Hi all, I hope you can help with the code below which was taken from an online source "Ktools for Excel", this seems to work but needs adapting in the following way.
Is anyone able amend this so that the replace range can "Match by case" and "Match entire cell contents"?
To somehow include the following two lines.
Thanks in advance.
Is anyone able amend this so that the replace range can "Match by case" and "Match entire cell contents"?
Code:
[Sub MultiFindNReplace()
Dim Rng As Range
Dim InputRng As Range, ReplaceRng As Range
xTitleId = "KutoolsforExcel"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Original Range ", xTitleId, InputRng.Address, Type:=8)
Set ReplaceRng = Application.InputBox("Replace 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
To somehow include the following two lines.
Code:
Selection.Replace What:="a", Replacement:="", LookAt:=xlWhole, MatchCase:=True
Thanks in advance.