View Single Post
 
Old 11-16-2014, 10:48 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
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

Quote:
Originally Posted by Marrick13 View Post
Now it works the way I want it except that it still doesn't perform a MATCHWHOLEWORD search, at least not to my liking. My test table has 21 cells containing 'TO BE SCANNED' and 30 containing "scanned' (all in the same column). Searching on 'TO BE SCANNED' produces 21 hits, as it should, but searching on 'scanned' produces 51, which means it is counting both the cells containing 'TO BE SCANNED' as well as those containing 'scanned'. What I want is to get 30 results when I search on 'scanned'. Isn't that what a MATCHWHOLEWORD search does?
Unless your text consists of 'TO BE SCANNED' in uppercase and 'scanned' in lowercase, there won't be a ready way of excluding the 'TO BE SCANNED' text from the 'scanned' results, since 'scanned' and 'SCANNED' are both whole words. If 'TO BE SCANNED' is in uppercase and 'scanned' is in lowercase, all you need do is set:
.MatchCase = True
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote