PC Review


Reply
Thread Tools Rate Thread

check substring of a string in Excel VBA

 
 
magix
Guest
Posts: n/a
 
      11th Dec 2005
Hi,

How do I check the subtring of a string ? I don't think I can use Strcomp.

Let say I have string "Hello world"

The Substring that I want to find is "orl"

What function can I use?

Regards,
Magix


 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      11th Dec 2005
Checkout the InStr() function in Help.
--
Gary's Student


"magix" wrote:

> Hi,
>
> How do I check the subtring of a string ? I don't think I can use Strcomp.
>
> Let say I have string "Hello world"
>
> The Substring that I want to find is "orl"
>
> What function can I use?
>
> Regards,
> Magix
>
>
>

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      11th Dec 2005
Or if you just want to know if the string contains "orl", use

MsgBox "Hello World" Like "*orl*"

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Gary''s Student" <(E-Mail Removed)> wrote in message
news:A92AD686-FECB-4F15-AC07-(E-Mail Removed)...
> Checkout the InStr() function in Help.
> --
> Gary's Student
>
>
> "magix" wrote:
>
> > Hi,
> >
> > How do I check the subtring of a string ? I don't think I can use

Strcomp.
> >
> > Let say I have string "Hello world"
> >
> > The Substring that I want to find is "orl"
> >
> > What function can I use?
> >
> > Regards,
> > Magix
> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
String Manipulation - Substring, VB function Left, "length safe" Substring kellygreer1 Microsoft C# .NET 6 29th Oct 2006 08:12 PM
How to get rid of string which contain a substring like 'PO BOX'. dukejas Microsoft Excel Programming 2 11th Nov 2003 03:37 AM
String.Remove vs String.Substring Janaka Microsoft Dot NET Framework 2 5th Nov 2003 02:59 PM
check if string contain substring Ivan Demkovitch Microsoft C# .NET 3 22nd Oct 2003 06:17 PM
string function that finds substring within string vaughn Microsoft C# .NET 2 4th Oct 2003 12:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:44 AM.