+ Reply to Thread
Results 1 to 7 of 7

Separating multiple data (w delimiter) from one cell to many cells

Hybrid View

rocketeer425 Separating multiple data (w... 02-11-2014, 12:13 AM
:) Sixthsense :) Re: Separating multiple data... 02-11-2014, 01:10 AM
rocketeer425 Re: Separating multiple data... 02-11-2014, 04:51 AM
:) Sixthsense :) Re: Separating multiple data... 02-11-2014, 06:16 AM
rocketeer425 Re: Separating multiple data... 02-12-2014, 03:41 AM
:) Sixthsense :) Re: Separating multiple data... 02-12-2014, 03:47 AM
rocketeer425 Re: Separating multiple data... 02-14-2014, 03:56 AM
  1. #1
    Registered User
    Join Date
    02-04-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Separating multiple data (w delimiter) from one cell to many cells

    Hi Sixthsense,

    Please see the sample workbook attached in this post.

    Additional information you may need:
    • I need the "Account #" column to be entered separately per row. Each account # for each row.
    • All other columns for a specific account # should also be included.
    • The comma (,) delimiter should be removed and the quote-sign (" ")

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Separating multiple data (w delimiter) from one cell to many cells

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button

    Sub SplitAndReplicateData()
    Dim rMyRng As Range, r As Range, rNxt As Range, i As Integer, vSplit As Variant
    
    Set rMyRng = Application.InputBox("Select Data Range", "Range Req.", _
                    Range("A1").CurrentRegion.Address, , , , , 8)
    
    Sheets.Add
    Set rNxt = ActiveCell
    
    Application.ScreenUpdating = False
    
    For Each r In rMyRng.Rows
        vSplit = Split(Replace(r.Cells(2).Value, """", ""), ",")
        For i = 0 To UBound(vSplit)
            r.Copy rNxt
            rNxt.Offset(, 1).Value = vSplit(i)
            Set rNxt = rNxt.Offset(1)
        Next i
    Next r
    
    Range("A1").CurrentRegion.Columns.AutoFit
    
    Application.ScreenUpdating = True
    
    End Sub


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ 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. Replies: 8
    Last Post: 03-18-2013, 11:14 PM
  2. [SOLVED] Multiple text values in 1 cell separating into two cells in number format
    By Mengo85 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-08-2013, 10:50 AM
  3. Separating Data of 1 cell into multiple columns
    By jamesb01 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-15-2009, 09:38 AM
  4. Separating cell data into 2 new cells.
    By Joe@WSC in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 07-07-2009, 10:10 AM
  5. Separating Name and Address with No Delimiter
    By lizzae in forum Excel General
    Replies: 4
    Last Post: 04-22-2009, 03:49 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