This looks really good - thank you. The only issue I have with it is that some search words might be preceded or followed by punctuation such as a dash, question mark, comma, etc.
I am a little familiar with the regex method in "[^A-Z0-9 ]", but when I tried adding the punctuation to it, the code ignored it. So the code does find and extract all whole word matches unless the search text has anything but a letter or number immediately in front of or behind it. How do I add the punctuation so the code recognizes the hits as whole word matches?
Regarding the range extending beyond one column, yes, I did not put a restriction on that because I wanted the search to look in all selected columns and rows (and that works fine, as far as I've seen). And you're right about there being more than one instance of the searchtext in any row, so that if one does not match the whole word and another one does, the code should extract it. I was responding only to the text you posted for illustration.
|