+ Reply to Thread
Results 1 to 2 of 2

Split contents of a cell based on a delimiter and reformat the splt

  1. #1
    Registered User
    Join Date
    08-12-2014
    Location
    CA
    MS-Off Ver
    2011
    Posts
    73

    Split contents of a cell based on a delimiter and reformat the splt

    Hello,
    I have a cell which has data separated by "_" for example _11_G_1_B_0_0_, I need to separate this data. It will split as 11, G, 1, B, 0, 0, (Blank Cell), next set of 6 cells and a blank cell again. After the split I want to cut every 6 rows and align them under each other. The 0's must be blank and finally a column inserted after the first cell. Example attached...


    Thanks!
    SplitCell.xlsx

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Split contents of a cell based on a delimiter and reformat the splt

    This macro will accomplish what you describe, though my results from your data are not exactly the same. This should get you close enough to make final edits easier.

    Please Login or Register  to view this content.

    How/Where to install the macro:

    1. Open up your workbook
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save as a macro-enabled workbook

    The macro is installed and ready to use.

    a) Make sure your data is on the activesheet listed in column A
    b) Press Alt-F8 and select SplitData from the macro list.
    Attached Files Attached Files
    Last edited by JBeaucaire; 01-05-2015 at 08:33 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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. [SOLVED] Split One Column at Delimiter While Copying Contents of Second Column to Populate New Rows
    By medailSacrosanct in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 08-01-2012, 11:37 AM
  2. Replies: 3
    Last Post: 11-28-2011, 03:08 PM
  3. Split contents of a cell into several cells (space as a delimiter)
    By ramky79 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-03-2011, 04:50 AM
  4. Split cell contents over multiple rows based on cell contents
    By naigy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-17-2011, 05:38 PM
  5. Split Cell by Delimiter, Move to New Row...
    By jpfulton in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 09-08-2008, 03:53 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