Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
extract " " space from middle of a string
a1= bob 1001
there is 10 space between bob and 1001. I want to extract bob and 1001. find " " command retuerns the position of last " ", in this case 13. How can I extract only "bob". |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
extract " " space from middle of a string
thanks for reply.
I used the command you mentioned (FIND(" ",A1)) but it returns 13. "Roger Govier" wrote in message ... Hi =FIND(" ",A1) returns 4 =LEFT(A1,FIND(" ",A1)-1) returns bob -- Regards Roger Govier "Rasoul Khoshravan" wrote in message ... a1= bob 1001 there is 10 space between bob and 1001. I want to extract bob and 1001. find " " command retuerns the position of last " ", in this case 13. How can I extract only "bob". |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
extract " " space from middle of a string
=LEFT(A5,SEARCH(" ",TRIM(A5))-1) returns "Bob"
=MID(TRIM(A5),SEARCH(" ",TRIM(A5))+1,256) returns "1001" Regards, Stefi €˛Rasoul Khoshravan€¯ ezt Ć*rta: a1= bob 1001 there is 10 space between bob and 1001. I want to extract bob and 1001. find " " command retuerns the position of last " ", in this case 13. How can I extract only "bob". |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
extract " " space from middle of a string
Hi
=FIND(" ",A1) returns 4 =LEFT(A1,FIND(" ",A1)-1) returns bob -- Regards Roger Govier "Rasoul Khoshravan" wrote in message ... a1= bob 1001 there is 10 space between bob and 1001. I want to extract bob and 1001. find " " command retuerns the position of last " ", in this case 13. How can I extract only "bob". |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
extract " " space from middle of a string
Hi
I wonder whether you have the non-breaking space CHAR(160) within your string? Try =FIND(CHAR(160),A1) and see what that produces. If it produces a result of 4, then that is where the problem lies. Try =LEFT(A1,FIND(" ",SUBSTITUTE(A1,CHAR(160),""))-1) -- Regards Roger Govier "Rasoul Khoshravan" wrote in message ... thanks for reply. I used the command you mentioned (FIND(" ",A1)) but it returns 13. "Roger Govier" wrote in message ... Hi =FIND(" ",A1) returns 4 =LEFT(A1,FIND(" ",A1)-1) returns bob -- Regards Roger Govier "Rasoul Khoshravan" wrote in message ... a1= bob 1001 there is 10 space between bob and 1001. I want to extract bob and 1001. find " " command retuerns the position of last " ", in this case 13. How can I extract only "bob". |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
extract " " space from middle of a string
On Wed, 11 Oct 2006 10:58:17 +0900, "Rasoul Khoshravan"
wrote: a1= bob 1001 there is 10 space between bob and 1001. I want to extract bob and 1001. find " " command retuerns the position of last " ", in this case 13. How can I extract only "bob". You could download and install Longre's free morefunc.xll add-in from: http://xcell05.free.fr/ and then use the formula: =REGEX.MID(A1,"\w+") to extract the first word =REGEX.MID(A1,"\w+",2) to extract the second It should not matter what kind of spaces are between the two "words". --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
EXTRACT NUMBERS FROM TEXT STRING | Excel Worksheet Functions | |||
How do I extract 3 middle results and average them in excel | Excel Worksheet Functions | |||
Extract hyperlink string from excel cell | Links and Linking in Excel | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) | |||
How do you extract numbers from a string of chacters in a cell (E. | Excel Worksheet Functions |