Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 01-14-2019, 07:11 AM
knpaddac knpaddac is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2018
Posts: 2
knpaddac is on a distinguished road
Default Search for lines that DO NOT have specific character


Hello all,
I am working on a document with thousands of basketball game scores. Typically each one is on its own line and is in this sort of syntax:


TeamA ##, TeamB ##


I am prepping all of this info so I can copy to Excel and the comma is very important as a delimiter. I want to be able to find lines in the Word document that DO NOT have a comma, but I am uncertain of what syntax to use in the 'find' function. Any help here would be appreciated as this would save tons of time searching for these instances.
Reply With Quote
  #2  
Old 01-14-2019, 01:16 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,467
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

You could use a wildcard Find, where:
Find = ^13[!,^13]{1,}^13

If you want to automatically insert the missing commas, you could use a wildcard Find/Replace, where:
Find = (^13[!^13]@[0-9]{1,})([!,^13]@[0-9])
Replace = \1,\2
Note that this won't work if the team names contain numerals.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add paragraph return between two specific character jeffreybrown Word 2 03-30-2017 02:45 PM
How can select from a specific character to another character mohsen.amiri Word 2 02-19-2015 11:38 PM
search for special character and apply outline? n00bie-n00b Word VBA 0 10-12-2014 03:17 AM
Search for character border = true ? n00bie-n00b Word VBA 6 10-08-2014 11:54 PM
Character based Search and Replace font size anacond11 Word 2 08-08-2013 08:10 AM


All times are GMT -7. The time now is 08:23 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft