A text management tool that has been available on the Unix platform for a
long time is known by the name 'regular expression' This powerful
capability uses patterns to analyze strings. These patterns are much
more sophisticated than the wildcard capability available in most
Microsoft Office programs including Excel.
Excel supports a limited
wildcard capability -- search Excel help for the keyword 'wildcard'
(without the quotes).
VBA supports a significantly better capability through its LIKE
operator -- search Excel VBA help for the keyword 'wildcard' (without the
However, now that VBScript supports regular expression, it is possible
to dramatically enhance the search and replace capability of both VBA and
Excel. The following are two wrapper functions that allow the use of
regular expressions in Excel formulas!
Adding the necessary code to an Excel workbook
Using the functions
Examples of solving problems
For more examples see my posts
(also search for
regexp and author tusharm), as well as the
archive of the Excel newsgroups. There is also a lot of material
on the web. Search