I have a VBA macro that looks for words that occur in strings. I do not want to match words that occur as part of other words, e.g. “bar” in barrier. I would like to match “ bar “ or “.Bar “ or “bar-“ “-bar”, i.e the word “bar”. Is there a function or application to do this?
Piece of code...