formula to delete last word in a column

J

Jason Morin

One way:

=RIGHT(A1,MATCH(" ",MID(A1,LEN(A1)+1-ROW(INDIRECT("1:"&LEN
(A1))),1),0)-1)

Array-entered (press ctrl + shift + enter).

HTH
Jason
Atlanta, GA
 
S

swatsp0p

Do you have a column of mixed numeric and text entries and you want to
delete the last text entry? What if the last text entry is more than
one word, delete only the last word or the entire entry?

This will probably require VB code to accomplish.

More details, please....
 
J

Jason Morin

Sorry, I wasn't paying attention. The formula will
extract the last word. Use this instead:

=LEFT(A1,LEN(A1)-MATCH(" ",MID(A1,LEN(A1)+1-ROW(INDIRECT
("1:"&LEN(A1))),1),0))

Also array-entered.

Jason
 
Top