This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub simpleRegex() | |
Dim strPattern As String: strPattern = "\d{6}" 'Define regex pattern here | |
Dim Match As Object | |
Dim matches As Object | |
Dim regex As Object | |
Set regex = CreateObject("VBScript.RegExp") | |
Dim strInput As String | |
Dim Myrange As Range | |
Set Myrange = ActiveSheet.Range("A1:A200") 'Define the range of column you want the regex to work on |