+ Reply to Thread
Results 1 to 5 of 5

Split data from one cell into two new rows

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Split data from one cell into two new rows

    Hi Guys,
    I have a spreadsheet which includes a number of product codes in column B, some of which display two codes in one cell with the second code inside brackets. I need a macro that identifies when a cell contains brackets and then inserts two rows below, the first to be filled with the first product code not in brackets, and the second row to be filled with the second product code which is inside brackets. The empty cells to the left and right of these new cells need to be populated with the data from the original row.
    I have attached a spreadsheet with two tabs, one for before and one after to show you what I mean as I'm sure I’ve just confused you…
    Attached Files Attached Files
    Last edited by ports83; 09-27-2012 at 01:56 AM.

  2. #2
    Registered User
    Join Date
    07-27-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007/2010
    Posts
    86

    Re: Split data from one cell into two new rows

    Try
    Please Login or Register  to view this content.
    Boon

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Split data from one cell into two new rows

    Try
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-05-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Split data from one cell into two new rows

    Thanks Bheanloh, that works well with my spreadsheet.

    Jindon, The code you've provided doesn't work with my spreadsheet as my sheet names are not constant. The Data on the example I provided is accurate, however the workbook/worksheet structure is not.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Split data from one cell into two new rows

    Quote Originally Posted by ports83 View Post
    Jindon, The code you've provided doesn't work with my spreadsheet as my sheet names are not constant. The Data on the example I provided is accurate, however the workbook/worksheet structure is not.
    That's your problem. not the code.
    Please Login or Register  to view this content.
    Last edited by jindon; 09-27-2012 at 02:02 AM.

+ 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