Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2024, 07:18 PM
cotech_10 cotech_10 is offline Find Replace Windows 10 Find Replace Office 2016
Novice
Find Replace
 
Join Date: Jan 2024
Posts: 1
cotech_10 is on a distinguished road
Smile Find Replace

Hi All,

I am simply trying to run the Find and Replace feature in MS Word undertaking the following:

In my word document I have over 100 lines that have the following type of syntax

Match_2\Level_0\Column1.txt
Match_2\Level_1\Column2.txt
Match_2\Level_2\Column3.txt
Match_2\Level_3\Column1.txt
Match_2\Level_4\Column2.txt
Match_2\Level_5\Column3.txt
Match_2\Level_6\Column1.txt
Match_2\Level_7\Column2.txt
Match_2\Level_8\Column3.txt


Match_2\Level_9\Column1.txt
Match_2\Level_10\Column2.txt


I would like to do a find and replace exercise only on lines that contain the following text : "Column2,txt" and to replace the following text within each line as follows: the text Match_2 is replaced with the text Match_3.

Therefore the modified data would be as below as highlighted in RED:

Match_2\Level_0\Column1.txt
Match_3\Level_1\Column2.txt
Match_2\Level_2\Column3.txt
Match_2\Level_3\Column1.txt
Match_3\Level_4\Column2.txt
Match_2\Level_5\Column3.txt
Match_2\Level_6\Column1.txt
Match_3\Level_7\Column2.txt
Match_2\Level_8\Column3.txt
Match_2\Level_9\Column1.txt
Match_3\Level_10\Column2.txt


Cheers
Reply With Quote
  #2  
Old 01-27-2024, 09:32 PM
Robert2 Robert2 is offline Find Replace Windows 10 Find Replace Office 2007
Competent Performer
 
Join Date: Jun 2013
Posts: 165
Robert2 will become famous soon enoughRobert2 will become famous soon enough
Default

Try the following wild card find/replace:
Find=([Match_2]@)(\\[!^p]@)(Column2.txt)
Replace=Match_3\2\3
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and replace paragraph mark on selected text and replace it with space in PowerPoint VBA laith93 PowerPoint 0 11-09-2023 04:34 AM
Find and Replace from Predetermined list of Text for Both Find and Replace dminor Word VBA 1 08-16-2022 03:40 PM
How do you use the find and replace tool to find dates and times in Excel 2013? Jules90 Excel 3 04-14-2020 07:40 PM
Find Replace Find what box in Find and replace limits the length of a search term Hoxton118 Word VBA 7 06-10-2014 05:05 AM
Find Replace Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft