Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Splitting the contents of a cell with enter key as the delimiter


From   Dev Vencappa <Dev.Vencappa@nottingham.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Splitting the contents of a cell with enter key as the delimiter
Date   Tue, 3 Dec 2013 16:46:02 +0000

Dear Stata users,

     I am trying to split the contents of a string variable which reads as one long name as below when viewing it in the data editor: 

Banc of America Securities LLCJP Morgan & Co IncMorgan Stanley

But upon closer inspection, this is actually stored with the enter key as a delimiter in the cell as below:

Banc of America Securities LLC
JP Morgan & Co Inc
Morgan Stanley

I am trying to use the command split to retrieve and save each of these three business names into three different columns. However, I am not sure how to code split to specify thatthe parser should be the enter key. Can someone please kindly offer a solution to this please? My string variable has thousands such cases where sometimes there are up to 15 different names in the content of a cell delimited using the enter key.

Thanks in advance and regards,
Dev
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.





*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index