Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Extract text string using MID

Dear all,

I have got a text string as below

She is a girl,,,,,"I am a boy",""

What the formula should be to extract the string between ,,,,," and ",""
so that the result comes out with I am a boy ?

Thanks

Turk


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Extract text string using MID

One way:

=SUBSTITUTE(SUBSTITUTE(MID(A1,FIND("""",A1)+1,255) ,"""",""),",","")

Biff

"Turk" wrote in message
...
Dear all,

I have got a text string as below

She is a girl,,,,,"I am a boy",""

What the formula should be to extract the string between ,,,,," and ",""
so that the result comes out with I am a boy ?

Thanks

Turk




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Extract text string using MID

Dear Biff,

Thanks for your prompt response.

However the formula doesn't work when there are some more characters follow
the strings

ie: She is a girl,,,,,"I am a boy",""she is a woman

returns I am a boyshe is a woman

but I only want the result to be I am a boy

Pls help


Turk




"Biff" .gbl...
One way:

=SUBSTITUTE(SUBSTITUTE(MID(A1,FIND("""",A1)+1,255) ,"""",""),",","")

Biff

"Turk" wrote in message
...
Dear all,

I have got a text string as below

She is a girl,,,,,"I am a boy",""

What the formula should be to extract the string between ,,,,," and
","" so that the result comes out with I am a boy ?

Thanks

Turk






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Extract text string using MID

Try this:

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

I'm assuming every entry has as part of the string:

.........."some text",..............

If not then post SEVERAL representative samples so we can see what's needed.

Biff

"Turk" wrote in message
...
Dear Biff,

Thanks for your prompt response.

However the formula doesn't work when there are some more characters
follow the strings

ie: She is a girl,,,,,"I am a boy",""she is a woman

returns I am a boyshe is a woman

but I only want the result to be I am a boy

Pls help


Turk




"Biff"
.gbl...
One way:

=SUBSTITUTE(SUBSTITUTE(MID(A1,FIND("""",A1)+1,255) ,"""",""),",","")

Biff

"Turk" wrote in message
...
Dear all,

I have got a text string as below

She is a girl,,,,,"I am a boy",""

What the formula should be to extract the string between ,,,,," and
","" so that the result comes out with I am a boy ?

Thanks

Turk








  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Extract text string using MID

Dear Biff,

This works, thank you~

Turk


"Biff" l...
Try this:

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

I'm assuming every entry has as part of the string:

........."some text",..............

If not then post SEVERAL representative samples so we can see what's
needed.

Biff

"Turk" wrote in message
...
Dear Biff,

Thanks for your prompt response.

However the formula doesn't work when there are some more characters
follow the strings

ie: She is a girl,,,,,"I am a boy",""she is a woman

returns I am a boyshe is a woman

but I only want the result to be I am a boy

Pls help


Turk




"Biff" .gbl...
One way:

=SUBSTITUTE(SUBSTITUTE(MID(A1,FIND("""",A1)+1,255) ,"""",""),",","")

Biff

"Turk" wrote in message
...
Dear all,

I have got a text string as below

She is a girl,,,,,"I am a boy",""

What the formula should be to extract the string between ,,,,," and
","" so that the result comes out with I am a boy ?

Thanks

Turk












  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Extract text string using MID

You're welcome. Thanks for the feedback!

Biff

"Turk" wrote in message
...
Dear Biff,

This works, thank you~

Turk


"Biff"
l...
Try this:

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

I'm assuming every entry has as part of the string:

........."some text",..............

If not then post SEVERAL representative samples so we can see what's
needed.

Biff

"Turk" wrote in message
...
Dear Biff,

Thanks for your prompt response.

However the formula doesn't work when there are some more characters
follow the strings

ie: She is a girl,,,,,"I am a boy",""she is a woman

returns I am a boyshe is a woman

but I only want the result to be I am a boy

Pls help


Turk




"Biff"
.gbl...
One way:

=SUBSTITUTE(SUBSTITUTE(MID(A1,FIND("""",A1)+1,255) ,"""",""),",","")

Biff

"Turk" wrote in message
...
Dear all,

I have got a text string as below

She is a girl,,,,,"I am a boy",""

What the formula should be to extract the string between ,,,,," and
","" so that the result comes out with I am a boy ?

Thanks

Turk












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
Extract specific value from a long text string Dinesh Excel Worksheet Functions 4 August 11th 06 04:24 AM
Formula to extract digits from a text string? [email protected] Excel Worksheet Functions 7 January 15th 06 04:16 AM
can you find specific text in a string ignoring any other text chriscp Excel Discussion (Misc queries) 1 September 18th 05 09:54 PM
EXTRACT TEXT FROM TEXT STRING carricka Excel Worksheet Functions 4 July 8th 05 11:00 AM
Extracting from a text string AmyTaylor Excel Worksheet Functions 3 June 24th 05 01:34 PM


All times are GMT +1. The time now is 12:19 PM.

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

About Us

"It's about Microsoft Excel"