ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Retriving text from a column (https://www.excelbanter.com/excel-discussion-misc-queries/235863-retriving-text-column.html)

JAF-In[_2_]

Retriving text from a column
 
how can i retrieve text from one column to another except one last word
for eg:The text "how can i retrieve text from" is in column A1 and i have to
retrieve "how can i retrieve text" to B1

Don Guillett

Retriving text from a column
 
The word "from" or ANY last word in the sentence?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"JAF-In" wrote in message
...
how can i retrieve text from one column to another except one last word
for eg:The text "how can i retrieve text from" is in column A1 and i have
to
retrieve "how can i retrieve text" to B1



Mike H

Retriving text from a column
 
Hi,

Try this

=SUBSTITUTE(A1,TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99)),"")

Mike

"JAF-In" wrote:

how can i retrieve text from one column to another except one last word
for eg:The text "how can i retrieve text from" is in column A1 and i have to
retrieve "how can i retrieve text" to B1


Domenic[_2_]

Retriving text from a column
 
In article ,
JAF-In wrote:

how can i retrieve text from one column to another except one last word
for eg:The text "how can i retrieve text from" is in column A1 and i have to
retrieve "how can i retrieve text" to B1



Try...

=LEFT(A1,FIND("^^",SUBSTITUTE(A1," ","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"
",""))))-1)

--
Domenic
http://www.xl-central.com

Rick Rothstein

Retriving text from a column
 
Try this

=SUBSTITUTE(A1,TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99)),"")


You should encase that in a TRIM function in order to get rid of the space
that is in front of that last word...

=TRIM(SUBSTITUTE(A1,TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99)),""))

--
Rick (MVP - Excel)


how can i retrieve text from one column to another except one last word
for eg:The text "how can i retrieve text from" is in column A1 and i have
to
retrieve "how can i retrieve text" to B1



Jacob Skaria

Retriving text from a column
 
Try

=TRIM(SUBSTITUTE(A1,TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99)),))

If this post helps click Yes
---------------
Jacob Skaria


"JAF-In" wrote:

how can i retrieve text from one column to another except one last word
for eg:The text "how can i retrieve text from" is in column A1 and i have to
retrieve "how can i retrieve text" to B1


Mike H

Retriving text from a column
 
You right, because I was removing spaces with the inner part of the formula

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99))

I never realised I would get the last space back when using the extracted
string in the outer substitute part, nice spot.

Mike

"Rick Rothstein" wrote:

Try this

=SUBSTITUTE(A1,),"")


You should encase that in a TRIM function in order to get rid of the space
that is in front of that last word...

=TRIM(SUBSTITUTE(A1,TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99)),""))

--
Rick (MVP - Excel)


how can i retrieve text from one column to another except one last word
for eg:The text "how can i retrieve text from" is in column A1 and i have
to
retrieve "how can i retrieve text" to B1





All times are GMT +1. The time now is 11:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com