#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Extracting Text

I have a cell that contains the following string:

America;005491;I/C FAMS Sweep ;05/01/2007;25511.30;106699

I would like a formula that would extract the string that is after the
second semi colon and that is before the third semi colon. In this case the
formula would return:

I/C FAMS Sweep

I will be copying this formula to other rows and the problem is that the
number between the second and third semi colon's will vary. This makes the
use of MID, RIGHT, or LEFT unworkable.

Any suggestions?



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 461
Default Extracting Text

try creating 5 new columns, going to text-to-columns
select Delimited

Go to other and type ;

Press ok

"Mike" wrote:

I have a cell that contains the following string:

America;005491;I/C FAMS Sweep ;05/01/2007;25511.30;106699

I would like a formula that would extract the string that is after the
second semi colon and that is before the third semi colon. In this case the
formula would return:

I/C FAMS Sweep

I will be copying this formula to other rows and the problem is that the
number between the second and third semi colon's will vary. This makes the
use of MID, RIGHT, or LEFT unworkable.

Any suggestions?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Extracting Text

I should have stated that I was trying to not use the Text To Columns.

"AKphidelt" wrote:

try creating 5 new columns, going to text-to-columns
select Delimited

Go to other and type ;

Press ok

"Mike" wrote:

I have a cell that contains the following string:

America;005491;I/C FAMS Sweep ;05/01/2007;25511.30;106699

I would like a formula that would extract the string that is after the
second semi colon and that is before the third semi colon. In this case the
formula would return:

I/C FAMS Sweep

I will be copying this formula to other rows and the problem is that the
number between the second and third semi colon's will vary. This makes the
use of MID, RIGHT, or LEFT unworkable.

Any suggestions?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Extracting Text

Assuming every entry has at least 3 ";"

I also notice there is a space after Sweep

=LEFT(MID(A1,FIND(";",A1,FIND(";",A1)+1)+1,255),FI ND(";",MID(A1,FIND(";",A1,FIND(";",A1)+1)+1,255))-2)

Biff

"Mike" wrote in message
...
I have a cell that contains the following string:

America;005491;I/C FAMS Sweep ;05/01/2007;25511.30;106699

I would like a formula that would extract the string that is after the
second semi colon and that is before the third semi colon. In this case
the
formula would return:

I/C FAMS Sweep

I will be copying this formula to other rows and the problem is that the
number between the second and third semi colon's will vary. This makes the
use of MID, RIGHT, or LEFT unworkable.

Any suggestions?





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 461
Default Extracting Text

lol, well that is going to be a difficult task... try this

=MID(I26,1+(FIND(";",I26,(FIND(";",I26,1)+1))),(FI ND(";",I26,3+FIND(";",I26,1+(FIND(";",I26,1)))))-(FIND(";",I26,1+FIND(";",I26,1)))-1)

That's the best I can do, other then VBA i see no other way of doing this...
but then again I'm not the smartest excel person around.

"Mike" wrote:

I should have stated that I was trying to not use the Text To Columns.

"AKphidelt" wrote:

try creating 5 new columns, going to text-to-columns
select Delimited

Go to other and type ;

Press ok

"Mike" wrote:

I have a cell that contains the following string:

America;005491;I/C FAMS Sweep ;05/01/2007;25511.30;106699

I would like a formula that would extract the string that is after the
second semi colon and that is before the third semi colon. In this case the
formula would return:

I/C FAMS Sweep

I will be copying this formula to other rows and the problem is that the
number between the second and third semi colon's will vary. This makes the
use of MID, RIGHT, or LEFT unworkable.

Any suggestions?





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Extracting Text

Try this:

=MID(A1,FIND(";",A1,FIND(";",A1)+1)+1,FIND(";",A1, FIND(";",A1,FIND(";",A1)+1)+1)-FIND(";",A1,FIND(";",A1)+1)-1)


"Mike" wrote:

I have a cell that contains the following string:

America;005491;I/C FAMS Sweep ;05/01/2007;25511.30;106699

I would like a formula that would extract the string that is after the
second semi colon and that is before the third semi colon. In this case the
formula would return:

I/C FAMS Sweep

I will be copying this formula to other rows and the problem is that the
number between the second and third semi colon's will vary. This makes the
use of MID, RIGHT, or LEFT unworkable.

Any suggestions?



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Extracting Text

Another way...

=MID(A1,FIND("^",SUBSTITUTE(A1,";","^",2))+1,FIND( "^",SUBSTITUTE(A1,";","^",3))-FIND("^",SUBSTITUTE(A1,";","^",2))-1)


"Mike" wrote:

I have a cell that contains the following string:

America;005491;I/C FAMS Sweep ;05/01/2007;25511.30;106699

I would like a formula that would extract the string that is after the
second semi colon and that is before the third semi colon. In this case the
formula would return:

I/C FAMS Sweep

I will be copying this formula to other rows and the problem is that the
number between the second and third semi colon's will vary. This makes the
use of MID, RIGHT, or LEFT unworkable.

Any suggestions?



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Extracting Text

Both of your formulas will pickup the space after Sweep.

Need to subtract 2 at the end.

Biff

"Teethless mama" wrote in message
...
Another way...

=MID(A1,FIND("^",SUBSTITUTE(A1,";","^",2))+1,FIND( "^",SUBSTITUTE(A1,";","^",3))-FIND("^",SUBSTITUTE(A1,";","^",2))-1)


"Mike" wrote:

I have a cell that contains the following string:

America;005491;I/C FAMS Sweep ;05/01/2007;25511.30;106699

I would like a formula that would extract the string that is after the
second semi colon and that is before the third semi colon. In this case
the
formula would return:

I/C FAMS Sweep

I will be copying this formula to other rows and the problem is that the
number between the second and third semi colon's will vary. This makes
the
use of MID, RIGHT, or LEFT unworkable.

Any suggestions?





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting text Guy Lydig Excel Discussion (Misc queries) 7 March 30th 07 10:12 AM
Extracting Text Brian Excel Worksheet Functions 8 March 7th 06 11:08 PM
Extracting Text only jtoy Excel Worksheet Functions 2 July 31st 05 02:30 AM
extracting text only Keith Excel Worksheet Functions 2 February 21st 05 12:57 PM
EXTRACTING TEXT EstherJ Excel Discussion (Misc queries) 3 December 16th 04 05:27 PM


All times are GMT +1. The time now is 06:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"