• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

Find/Replace

Hi,

I need some code to count column E, loop to the end of that count and if it finds "John Smith", replace with "Tony boat"

Thanks
0
Seamus2626
Asked:
Seamus2626
1 Solution
 
SteveCommented:
One line will do that:

Columns("E:E").Replace What:="John Smith", Replacement:="Tony Boat", LookAt:= _
        xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False

Open in new window

0
 
Seamus2626Author Commented:
Thank you!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now