+ Reply to Thread
Results 1 to 13 of 13

Text To Columns

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Text To Columns

    This should be easy, but I am just not getting it right. I have a column of data that looks like this; a bunch of ICD diagnostic codes:

    821.01-Fracture of femur; closed; shaft; 996.4-Mechanical Complication Of Internal Orthopedic Device Implant And Graft; 250.00-Diabetes mellitus; w/o mention of complication or manifestation; type II, controlled; 429.2-Cardiovascular disease, unspecified

    This is just a partial sample as they are generally longer. I need to spread the data into columns so that each one starts with a digit. Ie
    821.01-Fracture of femur; closed; shaft; 996.4-Mechanical Complication Of Internal Orthopedic Device Implant And Graft; etc...

    Any idea how to do this?

    Thanks,

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Text To Columns

    Here are the steps:-
    1. Select the column.
    2. Click Text to column in data tab.
    3. Select Delimited and Click Next.
    4. Select the Appropriate Delimited. In your case, it would be, I guess, ";". So type ; in Others.
    5. Since you type the delimiter, you will see the data converted into a table in the Preview provide Below.
    6. Check this preview for desired result.
    7. If it fulfills your need then click next and click Finish.
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Text To Columns

    that would split at all the; in
    ; 250.00-Diabetes mellitus; w/o mention of complication or manifestation; type II, controlled;
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Text To Columns

    Not sure I understand exactly what you want

    Can you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Text To Columns

    The poster above is exactly right. A simple ";" delineation does not do the trick. I tried replacing all "; #" using a formula I found online and applying it in Word's find/replace and then bringing it back into Excel, but I first need to get rid of all "." for it to work, which is not ideal. The formula was find: ([0-9][1,0]) and replace with: ~\1 to insert a "~" in front of any number. I then used "~" as the delineator.

    Any better way to do this and keep the periods?

    Thanks,

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Text To Columns

    Did you see post #4?

  7. #7
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Text To Columns

    See uploaded.
    Attached Files Attached Files

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Text To Columns

    OK thanks

    That is what you have, but what do you want it to look like?

  9. #9
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Text To Columns

    I need to separate the data into columns where the start of numbers represents a new entry. The format seems to be "; " followed by ###.##

    Thanks,

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Text To Columns

    Please provide a sample of your expwected outcome, so we dont have to guess

  11. #11
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Text To Columns

    Got it. Please see attached. Good point actually as I realized not all start with a number. Some have the pattern: $##.##

    Thanks,
    Attached Files Attached Files

  12. #12
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Text To Columns

    Enter this formula in B1 and pull it to the right until you see blanks

    =TRIM(MID(SUBSTITUTE($A1,";",REPT(" ",255)),(COLUMNS($A:A)-1)*255+1,255))
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Text To Columns

    AlKey, thats not going to work There are a few "sets" that have ; in the middle, otherwise T2C would also work
    (see posts 3 and 5)

+ 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. pull text from 2 columns based on finding text in other columns
    By jimcuk in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-03-2013, 09:21 AM
  2. Replies: 1
    Last Post: 03-09-2013, 02:55 PM
  3. MAcro to - copy, transpose, text to columns, remove column A, combine all columns in 1
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 02-07-2013, 08:48 AM
  4. Formula to align two columns with nearly similar text and attached numeric columns
    By Benefits Recon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-27-2012, 12:03 AM
  5. [SOLVED] Linking text columns with text and data columns
    By Edd in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-17-2005, 01:06 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