Searching in text without truncation

peter_sjogarde

Board Regular
Joined
Feb 13, 2012
Messages
56
I am looking for a way to search for words in text without truncating the search (which I automatically do if using instr). The script needs to be reasonably fast since I have about 3*50000 cells to search in and about 500 search terms. So far I have been using

Code:
If InStr(UCase(title(j, 1)), UCase(searchWords(i, 1))) > 0 Then

But sometimes I have search terms that I want to hit only if they stand alone (delimited with a blank or something like ,;.: or in begginging/end of cell). Eg. "LCA":
"I want to hit this cell contents about Life Cycle Assessment, LCA"
"I do not want to hit this cell contents about vuLCAnos"

How can i do this?
 

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top