![]() |
Parseing Text strings
I need to take a text string that has a Stock Option description in a
text string (i.e. ADM Dec 2006 40.0000 put). I want to divide up the text string and have each word in its own cell. I can not figure out how to do it. Problems arise b/c the stock symbol can have one to four characters (i.e. X or MSFT). What is the best way to do it so it automatically does it? I would prefer to use some sort of function that counts the spaces and gives the next word or something like that. DM |
Parseing Text strings
Highlight the column with the data in and use Data | Text-to-columns
specifying a space as the delimiter. Your date will be split, but you can easily recombine this if you want to. Hope this helps. Pete wrote: I need to take a text string that has a Stock Option description in a text string (i.e. ADM Dec 2006 40.0000 put). I want to divide up the text string and have each word in its own cell. I can not figure out how to do it. Problems arise b/c the stock symbol can have one to four characters (i.e. X or MSFT). What is the best way to do it so it automatically does it? I would prefer to use some sort of function that counts the spaces and gives the next word or something like that. DM |
Parseing Text strings
Given that the number of characters in the ticker symbol changes, the way I
would do it is Data--text to columns. -- Brevity is the soul of wit. " wrote: I need to take a text string that has a Stock Option description in a text string (i.e. ADM Dec 2006 40.0000 put). I want to divide up the text string and have each word in its own cell. I can not figure out how to do it. Problems arise b/c the stock symbol can have one to four characters (i.e. X or MSFT). What is the best way to do it so it automatically does it? I would prefer to use some sort of function that counts the spaces and gives the next word or something like that. DM |
Parseing Text strings
Thanks Pete, That will work but I need a more dynamic solution. The option text string is generated by a quote service and insterted in the cell. I need it then to be devided up and spread throught my spreadsheet. I really need it to be done automaticly b/c I don't want the final users of the spreadsheet to mess with the backend of my work. Dan |
Parseing Text strings
Thanks, That will work but I need a more dynamic solution. The option text string is generated by a quote service and insterted in the cell. I need it then to be devided up and spread throught my spreadsheet. I really need it to be done automaticly b/c I don't want the final users of the spreadsheet to mess with the backend of my work. Dan |
Parseing Text strings
On 5 Sep 2006 09:36:58 -0700, wrote:
I need to take a text string that has a Stock Option description in a text string (i.e. ADM Dec 2006 40.0000 put). I want to divide up the text string and have each word in its own cell. I can not figure out how to do it. Problems arise b/c the stock symbol can have one to four characters (i.e. X or MSFT). What is the best way to do it so it automatically does it? I would prefer to use some sort of function that counts the spaces and gives the next word or something like that. DM The simplest way to do it with functions is to download and install Longre's free morefunc.xll add-in from http://xcell05.free.fr/ Then, with your data in A1:An, enter the following: B1: =REGEX.MID($A1,"\S+",COLUMNS($A:A)) copy/drag across to F1. Select B1:F1 and copy drag down to Row n. The problem can also be solved with native functions, but the formulas are more complex. --ron |
Parseing Text strings
Thanks Ron.
|
Parseing Text strings
On 5 Sep 2006 13:39:48 -0700, wrote:
Thanks Ron. You're welcome. Glad to help. Lot's of other good functions in that add-in. --ron |
Parseing Text strings
|
All times are GMT +1. The time now is 10:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com