+ Reply to Thread
Results 1 to 2 of 2

Breaking several rows of data in single cell into a single cell per row

  1. #1
    Registered User
    Join Date
    02-17-2012
    Location
    Moscow, Russia
    MS-Off Ver
    Excel 2007
    Posts
    1

    Breaking several rows of data in single cell into a single cell per row

    I have a spreadsheet where each cell contains tens of rows of data i.e. the kind of rows you get when you use Alt+Enter (see attached example). Is there an Excel formula that I can use to automatically move each row of data within the cell to its own cell? I have tried copying and pasting 'text only' but that causes the content of some rows to spill onto several cells. Will appreciate your help.
    Attached Files Attached Files

  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: Breaking several rows of data in single cell into a single cell per row

    You can use Data > TextToColumns to split data by "visible characters", but the Alt-Enter (Char(10)) can't be used manually that way.

    But, VBA can use the TextToColumns method and it CAN use that character to split the data. So this one-command macro will do it for you:

    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. Press Alt-F8 and select it from the macro list.
    _________________
    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)

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