Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #15  
Old 02-18-2016, 05:58 PM
NoSparks NoSparks is offline Need to improve speed of Excel macro that searches for whole word matches Windows 7 64bit Need to improve speed of Excel macro that searches for whole word matches 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

I believe the .Pattern thing works opposite to your line of thought.

.Pattern = "[^characters you want to keep]"

.Pattern = "[^A-Za-z0-9\ ]"
keeps upper case A thru Z
keeps lower case a thru z
keeps numerals 0 thru 9
don't know what the back slash does as back slashes are removed
keeps spaces

I add a row to the top of your data and put in this

.Pattern = "[A-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!" & "#$%&'*+/=\?^_`{|}~-]+)*@(?:[a-z0-9](?:" & _"[a-z0-9-]*[a-\z0-9])?\.)+[a-z0-9](?:" & _"[a-z0-9-]*[a-z0-9])?"

use debug.print and this is what it gets reduced to using .Pattern = "[^A-Za-z0-9\ ]"

Pattern AZ09az09 az09 az09az09az09 az09az09
Reply With Quote
 

Tags
case, search, whole word match



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to speed up macro AC PORTA VIA Excel 3 10-30-2015 08:58 PM
Excel formula required to speed up process of creating species rarefaction curves. Ecology! Tim_F Excel 2 07-18-2014 04:56 AM
Need to improve speed of Excel macro that searches for whole word matches word and keyboard speed ptz Word 2 09-20-2012 06:37 AM
Need to improve speed of Excel macro that searches for whole word matches Help -can i improve this way of working? lucky67 Office 1 01-26-2012 09:20 PM
Need to improve speed of Excel macro that searches for whole word matches Change how windows searches cadams Office 1 12-07-2010 10:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft