+ Reply to Thread
Results 1 to 7 of 7

How to split data in different rows?

  1. #1
    Forum Contributor
    Join Date
    08-08-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    196

    How to split data in different rows?

    I am writing to request help, where I execute the following logic:

    Logic:
    If price column contains more than 3 separators ‘/’, then split each string value into new rows and highlight the output in yellow.

    for further example, please check the attachment below.
    separator_extract.xls
    Sheet 1 - shows input dataset
    Sheet2 - shows expected output

    if possible, an macro solution would be desirable as i have large set of dataset but any other guide or assistance would be most appreciated.

    thank you for your time and help.

  2. #2
    Registered User
    Join Date
    11-13-2006
    Posts
    87

    Re: How to split data in different rows?

    Is this the final presentation or will you be manipulating the data some more after this.

    The reason I ask is that often it is easier to do everything at once rather than doing it in discrete steps.

  3. #3
    Forum Contributor
    Join Date
    08-08-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    196

    Re: How to split data in different rows?

    Thank you for your reply. Sheet 2 shows a final presentation of the output. There would be no further manipulation required after this.

  4. #4
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: How to split data in different rows?

    Hi..

    Your attached workbook does not reflect your Logic..
    If price column contains more than 3 separators ‘/’
    Yet you have shown the values for "Redri" to be split even though there are only 2 "/" separators?

    Nevertheless..



    Try this.. result shown on sheet3.. notice how the row with 'apo' in it does not get carried over to the results (based on its lack of "/" separators)..

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

  5. #5
    Registered User
    Join Date
    11-13-2006
    Posts
    87

    Re: How to split data in different rows?

    Yes, the number of slashes to separate on is unclear. Neither example has "more than 3."

    So:
    1. We need correct Separator Limit.
    2. The operation MUST be in the original Worksheet.
    3. Leave the original Row untouched.
    4. The Title7 Column MUST be empty on new Rows.
    5. Highlight the new rows AND the original row they were derived from.
    6. Do not highlight unaffected Rows.

  6. #6
    Forum Contributor
    Join Date
    08-08-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    196

    Re: How to split data in different rows?

    Hi apo,

    Thank you for your reply and providing a solution.

    Apology for not making my explanation clearer in the above context. The condition should say the following:
    If the prices column contains a separator ‘/’ equals to or greater than 3 then...

    I have tested the above solution, however the I am sorry to trouble you further, but the code is currently throwing a error called - runtime error 9 : subscript out of range.

    When I click the debug button, it highlights the error on the following line:
    HTML Code: 
    Also, when the prices column contains more than one cell with separators, then the error is triggered, as shown in the following attached file under sheet1.
    separator_v2.xlsm
    The attachment above contains sample set of data, in sheet1 which is currently throwing the above error, as explained in this post.

    Any further guide or help in terms of resolving this error, would be very much appreciated and if possible to change the logic, so the script does not fail when there are more than 1 rows under prices column containing either 1 or 2 separators.

    Thank you for your time and help

  7. #7
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: How to split data in different rows?

    Hi..

    Sorry.. must be the Rum.. or lack of it previously

    I tested it on 5000 rows of 'raw' data... should be pretty fast...

    Try the attached..

    mm.. forum seems to be having a few issues with attachments..

    check it here:

    http://www.mediafire.com/download/na...arator_v2.xlsm
    Last edited by apo; 06-10-2015 at 11:56 AM.

+ 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. Split Cell data into rows
    By BS Singh in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-07-2014, 06:21 AM
  2. Split data set by 500 rows help
    By jimboli007 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-07-2012, 01:08 PM
  3. Macro to split a cell data into rows and copying other cells as it is in rows
    By shaan65 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-26-2010, 12:45 AM
  4. Macro to split a single cell data into rows and copying other cells as it is in rows
    By Pankaj Sonawane in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-25-2010, 07:09 PM
  5. [SOLVED] how to split data from 1 row into two rows continuously
    By monkeytrader in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-30-2005, 03:00 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