+ Reply to Thread
Results 1 to 6 of 6

Seperate a string into Rows / Columns based on a symbol

  1. #1
    Registered User
    Join Date
    01-11-2016
    Location
    Savannah, Ga
    MS-Off Ver
    2016
    Posts
    17

    Seperate a string into Rows / Columns based on a symbol

    In my mind this is much like csv style seperation. However it doesn't seem to work quite the same way.

    I have a long string of values i need to split out into a table.

    I've hand-typed one row from the string as I'd like it formatted. Each Column is delineated by the | symbol.

    I tried to use text-to-columns to split it into separate columns, but put everything back to the raw input so you guys can see what the input looks like.

    Please advise.

    Once again, thank you for your assistance folks!
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Seperate a string into Rows / Columns based on a symbol

    Hi,

    The Text to Columns works as I'd expect it. There are 575 | symbols in A1 and parsing it I get all the cells up until column VC filled in

    Please clarify what you are looking for.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    01-11-2016
    Location
    Savannah, Ga
    MS-Off Ver
    2016
    Posts
    17

    Re: Seperate a string into Rows / Columns based on a symbol

    what I'm looking to get are multiple rows that form up after the FALSE statement in the table. If it helps it's every 5th "|"

    I'm currently playing around with the FindWord function from here:
    http://www.extendoffice.com/document...-nth-word.html

    I changed the formula to look for "|" as a word separator and I can now call =FindWord(A1,Column()) to get "Ark Advance" to populate into A4, and drag that across the table to fill that row.
    However, I now need to be able to skip to the next line after the Dino column and start the next row, still pulling from the same cell A1.

    So i need some sort of counter to keep it going. Maybe a count() of the "|" characters?
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Seperate a string into Rows / Columns based on a symbol

    Hi,

    One way

    A4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    B4 copied across to E4
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-11-2016
    Location
    Savannah, Ga
    MS-Off Ver
    2016
    Posts
    17

    Re: Seperate a string into Rows / Columns based on a symbol

    Thank you Richard, that works for the first row of information I'm looking for, how would I keep that going though? I want to continue the information pull down to A5 after E4. When I try to pull the formula you have there it just gives me #VALUE! errors.

    I've been able to continue by manually putting a line break after each 5th |, however now my interest is peaked and I am sure to run into this again. I've quite curious how to make it work at this point. Even if it were to delve into VBA I'm looking to get my feet wet there as well.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Seperate a string into Rows / Columns based on a symbol

    Hi,

    The key is to change the COLUMN() bit of the formula since this determines the nth element of the Substitute formula that should be used. So..

    As before but in B1 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and in C1 copied across and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Richard Buttrey; 02-14-2016 at 07:11 PM.

+ 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. Converting Pipe Delimited Data String into Seperate columns using VBA Macro
    By mikey42979 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-20-2014, 03:15 PM
  2. Converting Pipe Delimited Data String into Seperate columns using VBA Macro
    By RestlessNative in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2014, 05:40 PM
  3. [SOLVED] Extract data from variable text string into seperate columns
    By kinnywayne in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-29-2014, 04:43 PM
  4. Splitting rows with multiple columns into seperate rows for time points.
    By mbracha in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-16-2013, 10:06 AM
  5. [SOLVED] Values in rows to seperate columns
    By aethsilgne in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-07-2012, 05:27 AM
  6. Seperate date by symbol?
    By khaos in forum Excel General
    Replies: 7
    Last Post: 01-03-2007, 05:39 PM
  7. Replies: 2
    Last Post: 10-10-2005, 01: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