Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 02-24-2020, 09:40 PM
macropod's Avatar
macropod macropod is offline Find, Replace using Excel List Windows 7 64bit Find, Replace using Excel List Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

As previously suggested, you might need to process singular & plural forms alike:
Code:
Sub BulkFindReplace()
Application.ScreenUpdating = False
Dim FList As String, RList As String, j As Long
FList = "School,Library,Technical,Mathematics,Physics,Chemistry,students,student,teachers,teacher"
RList = "Sch,lib,Tech,Maths,Phys,Chem,stdnts,stdnt,tchrs,tchr"
With ActiveDocument.Range.Find
  .ClearFormatting
  .Replacement.ClearFormatting
  .Format = False
  .Forward = True
  .MatchCase = False
  .MatchWholeWord = True
   'Process each word from the Find/Replace Lists
  For j = 0 To UBound(Split(FList, ","))
    .Text = Split(FList, ",")(j)
    .Replacement.Text = Split(RList, ",")(j)
    .Execute Replace:=wdReplaceAll
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and replace multiple values, according to table value - excel formula EtanM Excel Programming 3 04-11-2016 01:43 AM
Find, Replace using Excel List Find and Replace different in Excel 2010? admyers Excel 1 09-16-2015 10:28 AM
Find/Replace is not working - Excel 2010 fieldhaven Excel 2 02-19-2014 08:30 AM
Find - Replace Macro using a table list mdw Word 0 08-01-2013 04:36 PM
Find, Replace using Excel List Find and Replace using Excel range dmarie123 Word VBA 15 04-02-2013 07:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:13 PM.


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