Results 1 to 4 of 4

Text to rows

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-11-2014
    Location
    Eugene, Oregon
    MS-Off Ver
    MS EXCEL 2010
    Posts
    210

    Text to rows

    This is the current code I use:

    Sub SplitAndTranspose()
    Dim N() As String
    
       N = Split(ActiveCell, " - ")
       ActiveCell.Resize(UBound(N) + 1) = WorksheetFunction.Transpose(N)
    
    End Sub
    This takes a cell that I have selected and it essentially does text to rows by anything separated by a Hyphen (-). I need to expand on this idea and apply it to multiple cells but I am not sure how to. Currently I have a spreadsheet where I dump data into and that data range is A1:J50. The spreadsheet has headings in columns A-J and the columns E-J contain data that is separated by a Hyphen(-)> not Only do I need it to take the data in E-J and do a text to rows, I also want it to create a new row for each item that is separated so that it does not overwrite the data in the rows below which this current code does. Any help is appreciated. I have attached a sample sheet below.
    Attached Files Attached Files
    Last edited by JBeaucaire; 10-16-2015 at 03:33 PM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 08-06-2014, 07:57 AM
  2. Macro to keep rows that have certain text in one column, delete rows that do not.
    By mandalope in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2014, 02:35 PM
  3. [SOLVED] find sum of multiple rows referencing other rows and ignoring text
    By Mike Brewer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-02-2013, 03:29 PM
  4. VBA to Check if Rows containing Specifc Text are present, and if not, Add New Rows
    By cmaunder in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2013, 01:13 PM
  5. [SOLVED] Macro/VBA to Change Order of Rows/Add Rows based on specific text content presence/absence
    By cmaunder in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2013, 04:50 PM
  6. Add rows and search/copy/paste text into added rows
    By HelenW in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2010, 04:06 AM
  7. [SOLVED] Delete rows with numeric values, leave rows with text
    By GSpline in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-10-2005, 08:05 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