+ Reply to Thread
Results 1 to 12 of 12

SPLIT function help please

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    Silverdale, Washington
    MS-Off Ver
    Excel 2007
    Posts
    12

    SPLIT function help please

    I'm trying to split a cell and add rows below, filling in column R with info split from original delimited data in cell R.

    Reafidy posted the following function, but it only worked for two delimiters.
    Please Login or Register  to view this content.
    My spreadsheet has columns A-AR, Rows 1-29 (for now). In Column R, I have multiple delimited values. I'd like to add a row for each one, but leave other cells from other columns blank. Any help? Thanks!
    Last edited by lmtwashington; 11-01-2012 at 09:55 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: SPLIT function help please

    Do you mean the code only works for 2 values rather than delimiters?

    What are the values in column R on your worksheet delimeted by?

    Can you attach a sample workbook?

  3. #3
    Registered User
    Join Date
    11-01-2012
    Location
    Silverdale, Washington
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: SPLIT function help please

    sample-workbook.xlsx
    I'm trying to split columns R and AC, simultaneously adding their info in the rows below.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: SPLIT function help please

    The cells in columns R and AC don't have lists with the same no of items so they can't really be split at the same time.

    For example R2 has 4 items that are pipe delimited which would need 4 rows and AC2 has 12 items pipe delimited which would need 12 rows.

  5. #5
    Registered User
    Join Date
    11-01-2012
    Location
    Silverdale, Washington
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: SPLIT function help please

    Ok. Then to split for just one of the columns more than two delimiters?

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: SPLIT function help please

    Sorry, but I really don't understand what you mean by 'two' delimiters.

    There is one delimiter, the pipe |, and when the value in the cell is split using that as the delimiter you'll end up with multiple values.

  7. #7
    Registered User
    Join Date
    11-01-2012
    Location
    Silverdale, Washington
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: SPLIT function help please

    In the sample file, there are at least two pipes. I need to insert as many rows as there are variables. Right now, the formula only enters one row no matter how many pipes.

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: SPLIT function help please

    The reason the code does that is probably because it's designed to only put 2 values back on the worksheet.

    Anyway try this, it splits the values in AC and copies the other data as required.
    Please Login or Register  to view this content.

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: SPLIT function help please

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    HTH
    Regards, Jeff

  10. #10
    Registered User
    Join Date
    11-01-2012
    Location
    Silverdale, Washington
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: SPLIT function help please

    So, this copied all fields down to the next row, but I only want the info in the AC column to fill in below. No other cells should have data in them until the next product (row with new delimited info). I added a tab to show how I'd like the end result to look.sample-workbook.xlsx

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: SPLIT function help please

    Seems a bit strange to me but here you are.
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    11-01-2012
    Location
    Silverdale, Washington
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: SPLIT function help please

    Holy cow! You're a genius!!!! Thanks Norie!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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