ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   formula to delete last word in a column (https://www.excelbanter.com/excel-discussion-misc-queries/13518-formula-delete-last-word-column.html)

roger_home

formula to delete last word in a column
 

Can someone give me a formula to delete last word in a column?

Thanks
roger901


--
roger_home
------------------------------------------------------------------------
roger_home's Profile: http://www.excelforum.com/member.php...o&userid=16434
View this thread: http://www.excelforum.com/showthread...hreadid=346091


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

-----Original Message-----

Can someone give me a formula to delete last word in a

column?

Thanks
roger901


--
roger_home
---------------------------------------------------------

---------------
roger_home's Profile:

http://www.excelforum.com/member.php?
action=getinfo&userid=16434
View this thread:

http://www.excelforum.com/showthread...hreadid=346091

.


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....


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=346091


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

-----Original Message-----
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

-----Original Message-----

Can someone give me a formula to delete last word in a

column?

Thanks
roger901


--
roger_home
--------------------------------------------------------

-
---------------
roger_home's Profile:

http://www.excelforum.com/member.php?
action=getinfo&userid=16434
View this thread:

http://www.excelforum.com/showthread...hreadid=346091

.

.



All times are GMT +1. The time now is 10:01 AM.

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