Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-17-2017, 01:42 PM
Summytyme Summytyme is offline Macro/Replace Windows 10 Macro/Replace Office 2016
Novice
Macro/Replace
 
Join Date: Mar 2017
Posts: 3
Summytyme is on a distinguished road
Default Macro/Replace

Could someone please help....

I am trying to figure out how to remove "(cycle 1 of 1)" using wildcards.



For instance "(cycle 1 of 12)" or (cycle 4 of 8)" I am close but it is removing all numbers in my document instead of just the words above in "". each of my documents are different so I am trying to use the wildcard instead.

Thanks in advance!
Reply With Quote
  #2  
Old 03-17-2017, 03:43 PM
macropod's Avatar
macropod macropod is offline Macro/Replace Windows 7 64bit Macro/Replace Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

For that you could use a wildcard Find/Replace, where:
Find = "\(cycle [0-9]{1,} of [0-9]{1,}\)"
Replace = nothing
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-20-2017, 06:54 AM
Summytyme Summytyme is offline Macro/Replace Windows 10 Macro/Replace Office 2016
Novice
Macro/Replace
 
Join Date: Mar 2017
Posts: 3
Summytyme is on a distinguished road
Default

Thank you, I tried that but for some reason it is not working. I am not sure if it is case sensitive or space sensitive but the following is exactly how it shows on my word document. These numbers can go up to 25 on either side. I really appreciate your help

(Cycle 1 of 8)
Reply With Quote
  #4  
Old 03-20-2017, 03:10 PM
macropod's Avatar
macropod macropod is offline Macro/Replace Windows 7 64bit Macro/Replace Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

It's certainly case-sensitive, as the only examples you gave were all in lower-case. It's also sensitive to the # of spaces in the text. As it appears you also have instances of 'Case', you could use a wildcard Find/Replace, where:
Find = "\([Cc]ycle [0-9]{1,} of [0-9]{1,}\)"
Replace = nothing
If the spacing is variable, further changes could be made.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 03-31-2017, 11:22 AM
Summytyme Summytyme is offline Macro/Replace Windows 10 Macro/Replace Office 2016
Novice
Macro/Replace
 
Join Date: Mar 2017
Posts: 3
Summytyme is on a distinguished road
Default

OMG, thank you so much! It worked and you just saved me a ton of time.

Thank you
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro/Replace Find and Replace Macro amparete13 PowerPoint 3 03-11-2014 05:29 AM
Macro/Replace Macro - replace with condition ubns Word VBA 1 05-02-2012 12:52 AM
macro or find/replace JamesVenhaus Word 2 02-27-2012 03:34 PM
Macro/Replace Macro to Replace Fonts ballj_35 Word 3 05-10-2011 01:10 AM
Find and Replace Macro - A Better Way Tribos Word VBA 0 10-08-2008 03:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:04 PM.


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