Quote:
Originally Posted by Marrick13
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