+ Reply to Thread
Results 1 to 2 of 2

removing certain text from a string

  1. #1
    Papa Jonah
    Guest

    removing certain text from a string

    I have a column of report designators that consist of a bunch of text
    separated by hyphens
    xxx-xx-xxx-xxxxxyyyyy-nnnn-nnnn

    I want to end up with the text in the middle to be copied to another column.
    However, I can not (that I am aware of) use the mid function because the
    length of the strings between the hyphens can vary.

    Any suggestions would be greatly appreciated.
    TIA

  2. #2
    Tom Ogilvy
    Guest

    Re: removing certain text from a string

    Sub TTT()
    sStr = "xxx-xx-xxx-xxxxxyyyyy-nnnn-nnnn"
    v = Split(sStr, "-")
    MsgBox v(3)
    End Sub

    Requires xl2000 or later
    --
    Regards,
    Tom Ogilvy


    "Papa Jonah" <[email protected]> wrote in message
    news:[email protected]...
    > I have a column of report designators that consist of a bunch of text
    > separated by hyphens
    > xxx-xx-xxx-xxxxxyyyyy-nnnn-nnnn
    >
    > I want to end up with the text in the middle to be copied to another

    column.
    > However, I can not (that I am aware of) use the mid function because the
    > length of the strings between the hyphens can vary.
    >
    > Any suggestions would be greatly appreciated.
    > TIA




+ 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