+ Reply to Thread
Results 1 to 6 of 6

how to delete a string from another string

  1. #1
    Registered User
    Join Date
    07-20-2005
    Posts
    4

    how to delete a string from another string

    Hello, i want to delete a string from another string, like the example below:

    variable: "daniel" - "niel"

    so in my variable i would have "da"

    how can i do it??

    thanks.

  2. #2
    Niek Otten
    Guest

    Re: how to delete a string from another string

    =SUBSTITUTE(A1,"niel",)

    --
    Kind regards,

    Niek Otten

    "Ribap" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hello, i want to delete a string from another string, like the example
    > below:
    >
    > variable: "daniel" - "niel"
    >
    > so in my variable i would have "da"
    >
    > how can i do it??
    >
    > thanks.
    >
    >
    > --
    > Ribap
    > ------------------------------------------------------------------------
    > Ribap's Profile:
    > http://www.excelforum.com/member.php...o&userid=25382
    > View this thread: http://www.excelforum.com/showthread...hreadid=515303
    >




  3. #3
    Registered User
    Join Date
    07-20-2005
    Posts
    4
    yeah, but i need to do this in vba code, and that code does not work in vba

  4. #4
    Niek Otten
    Guest

    Re: how to delete a string from another string

    a = Application.WorksheetFunction.Substitute(a, "niel", "")

    --
    Kind regards,

    Niek Otten

    "Ribap" <[email protected]> wrote in
    message news:[email protected]...
    >
    > yeah, but i need to do this in vba code, and that code does not work in
    > vba
    >
    >
    > --
    > Ribap
    > ------------------------------------------------------------------------
    > Ribap's Profile:
    > http://www.excelforum.com/member.php...o&userid=25382
    > View this thread: http://www.excelforum.com/showthread...hreadid=515303
    >




  5. #5
    Registered User
    Join Date
    07-20-2005
    Posts
    4

    Thumbs up

    Thanks a lot, it works great.

  6. #6
    Andrew Taylor
    Guest

    Re: how to delete a string from another string

    Or :
    a = Replace(a, "niel", "")



    Niek Otten wrote:
    > a = Application.WorksheetFunction.Substitute(a, "niel", "")
    >
    > --
    > Kind regards,
    >
    > Niek Otten
    >
    > "Ribap" <[email protected]> wrote in
    > message news:[email protected]...
    > >
    > > yeah, but i need to do this in vba code, and that code does not work in
    > > vba
    > >
    > >
    > > --
    > > Ribap
    > > ------------------------------------------------------------------------
    > > Ribap's Profile:
    > > http://www.excelforum.com/member.php...o&userid=25382
    > > View this thread: http://www.excelforum.com/showthread...hreadid=515303
    > >



+ 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