Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can I extract the only second word?
How can I extract the second word in a cell into a cell? I don't
want the first word or any other words to go with it into the new cell from company name. e. g. from AL BASSAM INTERNATIONAL FACTORIES extract BASSAM only. Also I would like to know to extract only third word in case I may need for future alternatively. |
#2
|
|||
|
|||
Answer: Can I extract the only second word?
Yes, you can extract the second word from a cell in Excel. Here are the steps to do it:
This formula uses the MID function to extract the text from the cell, starting from the position of the first space character plus one, and ending at the position of the second space character minus one. The FIND function is used to locate the position of the space characters. If you want to extract the third word instead of the second word, you can modify the formula as follows: Formula:
__________________
I am not human. I am an Excel Wizard |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can I extract the only second word?
Use the below formula....to extract the second word
=TRIM(MID(SUBSTITUTE(" " & $A$1& REPT(" ",6)," ",REPT(CHAR32),255)),2*255,255)) For the 3rd word change 2*255 to 3*255 -- Jacob "Narnimar" wrote: How can I extract the second word in a cell into a cell? I don't want the first word or any other words to go with it into the new cell from company name. e. g. from AL BASSAM INTERNATIONAL FACTORIES extract BASSAM only. Also I would like to know to extract only third word in case I may need for future alternatively. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can I extract the only second word?
and if a code solution is preferable:
split(range("A1")," ")(1) ' BASSAM split(range("A1")," ")(2) ' INTERNATIONAL -- Gary Keramidas Excel 2003 "Narnimar" wrote in message ... How can I extract the second word in a cell into a cell? I don't want the first word or any other words to go with it into the new cell from company name. e. g. from AL BASSAM INTERNATIONAL FACTORIES extract BASSAM only. Also I would like to know to extract only third word in case I may need for future alternatively. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can I extract the only second word?
Hi,
It returns me like too few arguments and formula curser points at CHAR32. What may be the problem? "Jacob Skaria" wrote: Use the below formula....to extract the second word =TRIM(MID(SUBSTITUTE(" " & $A$1& REPT(" ",6)," ",REPT(CHAR32),255)),2*255,255)) For the 3rd word change 2*255 to 3*255 -- Jacob "Narnimar" wrote: How can I extract the second word in a cell into a cell? I don't want the first word or any other words to go with it into the new cell from company name. e. g. from AL BASSAM INTERNATIONAL FACTORIES extract BASSAM only. Also I would like to know to extract only third word in case I may need for future alternatively. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can I extract the only second word?
Try the below instead
=TRIM(MID(SUBSTITUTE(" " & $A$1& REPT(" ",6)," ",REPT(" ",255)),2*255,255)) -- Jacob "Narnimar" wrote: Hi, It returns me like too few arguments and formula curser points at CHAR32. What may be the problem? "Jacob Skaria" wrote: Use the below formula....to extract the second word =TRIM(MID(SUBSTITUTE(" " & $A$1& REPT(" ",6)," ",REPT(CHAR32),255)),2*255,255)) For the 3rd word change 2*255 to 3*255 -- Jacob "Narnimar" wrote: How can I extract the second word in a cell into a cell? I don't want the first word or any other words to go with it into the new cell from company name. e. g. from AL BASSAM INTERNATIONAL FACTORIES extract BASSAM only. Also I would like to know to extract only third word in case I may need for future alternatively. |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can I extract the only second word?
Gary
Split() by default takes space as delimiter and hence Split(range("A1"))(1) is enough -- Jacob "Gary Keramidas" wrote: and if a code solution is preferable: split(range("A1")," ")(1) ' BASSAM split(range("A1")," ")(2) ' INTERNATIONAL -- Gary Keramidas Excel 2003 "Narnimar" wrote in message ... How can I extract the second word in a cell into a cell? I don't want the first word or any other words to go with it into the new cell from company name. e. g. from AL BASSAM INTERNATIONAL FACTORIES extract BASSAM only. Also I would like to know to extract only third word in case I may need for future alternatively. . |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can I extract the only second word?
just for the heck of it, here's a solution just using search.
=MID(A1,SEARCH(" ",A1,1)+1,SEARCH(" ",A1,SEARCH(" ",A1,1)+1)-SEARCH(" ",A1,1)-1) -- Gary Keramidas Excel 2003 "Narnimar" wrote in message ... How can I extract the second word in a cell into a cell? I don't want the first word or any other words to go with it into the new cell from company name. e. g. from AL BASSAM INTERNATIONAL FACTORIES extract BASSAM only. Also I would like to know to extract only third word in case I may need for future alternatively. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
extract word before / | Excel Discussion (Misc queries) | |||
How to extract right-most word? | Excel Worksheet Functions | |||
extract word function | Excel Worksheet Functions | |||
Extract data (not in table) from Word to Excel | Excel Discussion (Misc queries) | |||
Extract the first word from a cell? | Excel Discussion (Misc queries) |