Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My regex is not identifying multiple matches below. Why is this? I keep
getting a return of 1 instead of 3. Sub Thing() Dim x As String Dim z As Double x = "The black cat" z = ReturnWords(x) End Sub Private Function ReturnWords(y As String) As Double Dim objRegExp As Object Dim Match As Variant Dim Matches Dim tempstring As Variant Dim Counter As Double Set objRegExp = CreateObject("Vbscript.RegExp") objRegExp.IgnoreCase = IgnoreCase objRegExp.MultiLine = MultiLine objRegExp.Pattern = "\w+" 'words Set Matches = objRegExp.Execute(y) ReturnWords = Matches.Count End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Match formula to match values in multiple columns | Excel Discussion (Misc queries) | |||
MATCH working but not.... | Excel Worksheet Functions | |||
MATCH Multiple Criteria & Return Previous / Penultimate Match | Excel Worksheet Functions | |||
MATCH not working | Excel Worksheet Functions |