Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Regular Expression
So I am new to VB Macros in Excel and I swear I came across some method
called .contains where if a cell contained the string or regular expression you were searching for it returned a boolean of True or false if it didn't find it. Now that I am returning to my notes I can't find it, nor can I find it in books or on-line. Has anyone heard of this or is there a better way to check if a cell's contents conform to a particular pattern? Thanks! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Regular Expression
sl wrote...
So I am new to VB Macros in Excel and I swear I came across some method called .contains where if a cell contained the string or regular expression you were searching for it returned a boolean of True or false if it didn't find it. Now that I am returning to my notes I can't find it, nor can I find it in books or on-line. Has anyone heard of this or is there a better way to check if a cell's contents conform to a particular pattern? VBA provides an operator named Like which provides very lightweight pattern matching. If you want true regular expressions, you could use [OLE] Automation to access VBScript regular expressions. See the following article in the archives. http://groups.google.com/group/micro...20fccb662c0f63 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Regular Expression
In article .com,
says... So I am new to VB Macros in Excel and I swear I came across some method called .contains where if a cell contained the string or regular expression you were searching for it returned a boolean of True or false if it didn't find it. Now that I am returning to my notes I can't find it, nor can I find it in books or on-line. Has anyone heard of this or is there a better way to check if a cell's contents conform to a particular pattern? Thanks! In addition to Harlan's suggestion, to use regular expressions in a UDF, check http://www.tmehta.com/regexp/ particularly http://www.tmehta.com/regexp/add_code.htm -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VB Script Regular Expressions - Missing | Excel Discussion (Misc queries) | |||
Convert a julian gregorian date code into a regular date | Excel Worksheet Functions | |||
regular code module | Excel Discussion (Misc queries) | |||
Can Excel represent formula in textural format with values substi. | Excel Worksheet Functions | |||
Excel Expression | Excel Discussion (Misc queries) |