+ Reply to Thread
Results 1 to 4 of 4

Split function won't split all delimited values

  1. #1
    Registered User
    Join Date
    12-21-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    16

    Split function won't split all delimited values

    Hi all,

    I've managed to piece together some code which splits delimited values but it doesn't seem to populate the final value into a new column.

    The example value I am trying to split looks like this

    A<br>B<br>C<br>D<br>E

    Values A to D are split into individual columns but value E never seems to be.

    I think it's staring me in the face but for the life of me I can't figure it out.

    Please Login or Register  to view this content.
    Any help would be greatly appreciated.

    Thanks,

    q

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Split function won't split all delimited values

    Hi,

    Perhaps just this
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    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 won't split all delimited values

    You may also take a look at formula solution
    Enter formula in B1 and drag formula across until you see blanks
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D E F
    1 A<br>B<br>C<br>D<br>E A B C D E
    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

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Split function won't split all delimited values

    The procedure does not enter to line "Else Cells (r, colStart) = str (i)" because you have "If i = UBound(str) Then" clause, and part 'E' of the array is skipped.

    Edit:
    Below will be shorter code for an array elements:
    Please Login or Register  to view this content.
    but variable 'str' declared as Variant, i.e. 'Dim str As Variant'
    Last edited by mjr veverka; 11-17-2017 at 12:08 PM.

+ 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. Need Macro code to split data split in 7 sheets based on variable rows in column A
    By Alija_21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2015, 08:03 AM
  2. Split cell to create sorted heading on empty row above and keep second split info
    By CastingDirector in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2015, 12:24 AM
  3. [SOLVED] Split Array, Listing Marked Items in Split Arrays
    By lesoies in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-27-2013, 02:07 AM
  4. How Do I Split Text Based Upon Two Values To Split
    By HowdeeDoodee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2012, 05:05 AM
  5. Split forward slah delimited column to rows
    By Abu-Dina in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2012, 05:50 AM
  6. Function to split up a table based upon the values in a reference column
    By alexdragne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-08-2012, 02:45 PM
  7. 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

Tags for this Thread

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