+ Reply to Thread
Results 1 to 3 of 3

check substring of a string in Excel VBA

  1. #1
    magix
    Guest

    check substring of a string in Excel VBA

    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



  2. #2
    Gary''s Student
    Guest

    RE: check substring of a string in Excel VBA

    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
    >
    >
    >


  3. #3
    Bob Phillips
    Guest

    Re: check substring of a string in Excel VBA

    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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1