RegEx functions in VBA

Regular Expressions (RegEx) is a common string processing technique for handling strings that conform to patterns, as opposed to fixed strings.

Perl Problems

XKCD Perl Problems

It is an excellent set of functionality that is available in most programming languages, and even in SQL.  It is however not readily available in Excel or VBA.  This has it downsides if you’re trying to complex string matching and extraction, so in my personal workbook, I include the RegEx functions available at .  These are utilised in my dynamic named range generating macro and have been a real life saver when faced with three different tabs of manual-entry logs that need the finding and identification of file references used in various places.



1) Learn about RegEx at

2) Use it in your coding language of choice, and feel frustrated

3) Bring the frustrations and the benefits into VBA and Excel with