#1   Report Post  
Old January 22nd 07, 11:10 PM posted to microsoft.public.excel.misc
sl sl is offline
external usenet poster
 
First recorded activity by ExcelBanter: Jan 2007
Posts: 2
Default 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   Report Post  
Old January 22nd 07, 11:27 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 733
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB Script Regular Expressions - Missing John Taylor Excel Discussion (Misc queries) 2 August 17th 06 12:32 PM
Convert a julian gregorian date code into a regular date Robert Excel Worksheet Functions 3 June 13th 06 07:03 PM
regular code module billy boy Excel Discussion (Misc queries) 4 December 13th 05 07:30 PM
Can Excel represent formula in textural format with values substi. BoneR Excel Worksheet Functions 7 March 31st 05 03:11 PM
Excel Expression Yubasus Excel Discussion (Misc queries) 2 November 26th 04 12:41 AM


All times are GMT +1. The time now is 12:42 PM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017