Results 1 to 5 of 5

Split A List my Space in adjacent Columns

Threaded View

  1. #1
    Registered User
    Join Date
    11-26-2014
    Location
    London
    MS-Off Ver
    2013
    Posts
    95

    Lightbulb Split A List my Space in adjacent Columns

    Hi I have a Column of over 2,000 rows. Each field has a string of words (like a Sentence). I want to run a code that scrolls down the list and splits out each individual word in the string into the adjacent column.

    I have attached an example with the following code.

    The splitting element works and so does the range. What I can't get to work is the result being outputted next to each line.

    Appreciate any help. Still learning...

    
    Sub Testing()
    
    Dim ShSource As Worksheet
    Set ShSource = ThisWorkbook.Sheets("Sheet1")
    Dim cell As Range, NamestoStandard As Range
    Set NamestoStandard = ShSource.Range("A2:A10")
    
    
    For Each cell In NamestoStandard
    
    Dim txt As String
    Dim i As Integer
    Dim fullname As Variant
    
    txt = cell
    fullname = Split(txt, " ")
    For i = 0 To UBound(fullname)
    
    Cells(1, i + 1).Value = fullname(i)
    Next i
    
    Next cell
    
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 07-25-2013, 05:28 AM
  2. Split 2 column list into 4 columns
    By quasifun in forum Excel General
    Replies: 2
    Last Post: 03-04-2013, 01:24 PM
  3. Text to columns, split at first space only
    By Wowbagger in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 06-21-2012, 01:27 PM
  4. Ordering a list and the adjacent columns to that list
    By mmcleod in forum Excel General
    Replies: 3
    Last Post: 06-18-2012, 04:40 PM
  5. Split data into adjacent columns
    By Rockstar666 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-18-2010, 12:01 PM
  6. Split data into adjacent columns
    By ElmerS in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-21-2009, 11:34 AM
  7. [SOLVED] How do you split one document into two columns?-utilize all the space on the page
    By joanster00 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-30-2005, 12:05 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