+ Reply to Thread
Results 1 to 6 of 6

Split Function

Hybrid View

gsandy Split Function 12-18-2017, 01:50 PM
Mumps1 Re: Split Function 12-18-2017, 01:55 PM
gsandy Re: Split Function 12-18-2017, 02:04 PM
AlKey Re: Split Function 12-18-2017, 01:58 PM
gsandy Re: Split Function 12-18-2017, 02:01 PM
Mumps1 Re: Split Function 12-18-2017, 02:02 PM
  1. #1
    Forum Contributor
    Join Date
    02-26-2009
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    286

    Split Function

    I am having trouble with getting the split function to work!
    Dim MyString As String
    MyString = Split(Rng1.Offset(0, 23).Value2, ",",2)
    MsgBox MyString
    The value of Rng1.Offset(0, 23).Value2 is “Training Given, Joe Bloggs, 12-12-17”
    I am trying to extract the “Joe Bloggs” portion.
    How can I modify the code to get it to work?
    Thanks Sandy.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,052

    Re: Split Function

    Try:
    Dim MyString As String
    MyString = Split(Rng1.Offset(0, 23).Value2, ",")(1)
    MsgBox MyString
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Contributor
    Join Date
    02-26-2009
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    286

    Re: Split Function

    Thanks also Alkey

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Split Function

    Try formula
    Formula: copy to clipboard
    =TRIM(MID(SUBSTITUTE(A1,",",REPT(" ",50)),50,50))

    v A B
    1 Training Given, Joe Bloggs, 12-12-17 Joe Bloggs
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Forum Contributor
    Join Date
    02-26-2009
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    286

    Re: Split Function

    Thanks Mumps that worked a treat. Cheers Sandy

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,052

    Re: Split Function

    You are very welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Split function won't split all delimited values
    By quetzalc0atl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-17-2017, 11:49 AM
  2. [SOLVED] Using the Split function with another function incorporated is not working correctly
    By highlystrung in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2013, 03:51 PM
  3. Can excels Split() function split a string up at multiple spots?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2011, 02:36 PM
  4. Replies: 3
    Last Post: 10-27-2010, 03:11 AM
  5. Split Function in vba
    By Bob@Sun in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-02-2010, 05:46 AM
  6. [SOLVED] Split Function
    By coco in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2005, 07:05 PM
  7. Split function
    By coco in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2005, 06:10 PM

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