+ Reply to Thread
Results 1 to 3 of 3

Split function

  1. #1
    coco
    Guest

    Split function

    I have a question:
    Can I use the "split" function to split one by one, EACH Character of a what
    is contained in a cell.

    I mean, can I use something like this?

    SplitAllChar= Split(myVal, "")

    Thanks

    Coco

  2. #2
    Bob Phillips
    Guest

    Re: Split function

    Don't think so, you have to do it yourself

    ReDim SplitAllChar(1 To Len(myVal))
    For i = 1 To Len(myVal)
    SplitAllChar(i) = Mid(myVal, i, 1)
    Next i


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "coco" <coco@discussions.microsoft.com> wrote in message
    news:570C95F2-1EEB-427C-85A9-2DB7C6D8CEBF@microsoft.com...
    > I have a question:
    > Can I use the "split" function to split one by one, EACH Character of a

    what
    > is contained in a cell.
    >
    > I mean, can I use something like this?
    >
    > SplitAllChar= Split(myVal, "")
    >
    > Thanks
    >
    > Coco




  3. #3
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481
    According to the VBA help file " If delimiter is a zero-length string, a single-element array containing the entire expression string is returned."

    You could add a space after each character and then perform the split with space (" ") as the delimiter.

+ 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