Skip to main content
Support is Online
We're back! We are here to assist you. Please be patient, we will respond to your tickets shortly.
Official support hours
Monday To Friday
From 09:00 To 17:30
  Wednesday, 27 November 2019
  0 Replies
  3.1K Visits
0
Votes
Undo
I found the below VBA on this site.    How would I cause it to only find exact cell contents and then replace those contents?
Thanks
Sub
MultiFindNReplace()

'Update 20140722

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
There are no replies made for this post yet.