View Single Post
 
Old 02-18-2016, 08:24 PM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Quote:
I tried plugging that long pattern above into the code and got syntax errors
That was the string of characters I put into cell D2 to check that .Pattern = "[^A-Za-z0-9\ ]" was all that was required to remove all those particular characters.
It was.

I can't figure out what you're talking about, nor why.
All the string manipulation, array population and matching to the SearchText happens in memory.
Without using message boxes or debug.print to show the individual array elements, you can't see what's going on.
Where is it you are finding these "hits that have a dash (or hyphen) before or after the search term (without spaces)." that you think are not being treated as whole words?
And what do you mean by extract it? I was of the impression the intent was to copy entire rows.
Reply With Quote