Newsgroups: microsoft.public.excel.programming
From: "Tom Ogilvy" <twogi...@msn.com>
Date: Thu, 2 May 2002 22:45:13 -0400
Local: Thurs, May 2 2002 10:45 pm
Subject: Re: Look instr for specific string types
Did you look at the LIKE operator as I suggested.
If you were looking for something more powerful why have a subject like: "Look instr for specific string types" And then say: > > I need a function that will look in a cell and see (using instr) whether No reason to keep your question a secret - go ahead and say what you want. > > certain expressions are there. If you want to do regular expressions, here is some information previously =====< extract from a posting by Harlan Grove >===== I had given an implied warning that I might elaborate on the strictly Here's a url describing regular expressions: Here's a link to Microsoft's top scripting page: If you have Internet Explorer 5 installed, you should have the VBScript 5 Getting back to the point, using Robert Bruce's suggestion on using late Function psub(matchpat As String, replacepat As String, s As String, An example of how it could be used: =psub("[a-zA-Z]","",string) Part #: ABC123-456X5B32 -> #: 123-456532 It could be used as a more powerful find & replace. Here's an example of =psub("=(\w+)\+(\w+)/(\w+)","=myfunc($1)+$2/otherfunc($3)",C1) =A1+A2/A11 -> =myfunc(A1)+A2/otherfunc(A11) And here's another user-defined function that returns either the number of Function pmatch(s As String, matchpat As String, Optional matchnum As Byte = =======< end of previous posting >===== Regards, > Thanks Tom
> But I was looking for an expression like > Where the * is a wild card number > Tom > "Tom Ogilvy" <twogi...@msn.com> wrote in message > Also look at help on the Like operator; that may be closer to what you > That is about all I can garner from your explanation. > What is unique or special about 155? > Regards, > "Tom Hingston" <t...@NOSPAM.co.nz> wrote in message > > I need a function that will look in a cell and see (using instr) whether > > I believe there are things called regular expressions but I am not sure > > Any help gratefully appreciated You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||