Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Steve Madden
 
Posts: n/a
Default Extracting All But Last Word

I work with street addresses and want to make changes to the suffixes
without changing the rest of the address. I know how to use a function to
copy the suffix (or last word in a cell) to another cell. But, I do not know
how to copy everything EXCEPT the suffix (or last word in a cell) to another
cell. Please suggest a formula that will do this. TIA


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Extracting All But Last Word

Try this:

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

Note: Commit that array formula by holding down the [Ctrl][Shift] keys and
press [Enter].

That formula pulls text to the left of the last space-character in the string.

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Steve Madden" wrote:

I work with street addresses and want to make changes to the suffixes
without changing the rest of the address. I know how to use a function to
copy the suffix (or last word in a cell) to another cell. But, I do not know
how to copy everything EXCEPT the suffix (or last word in a cell) to another
cell. Please suggest a formula that will do this. TIA



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Extracting All But Last Word

This method (posted by Domenic some time ago) uses a non-array formula:
=LEFT(A1,SEARCH("^^",SUBSTITUTE(A1," ","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"
",""))))-1)

Just press [Enter] to commit that formula.

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Ron Coderre" wrote:

Try this:

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

Note: Commit that array formula by holding down the [Ctrl][Shift] keys and
press [Enter].

That formula pulls text to the left of the last space-character in the string.

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Steve Madden" wrote:

I work with street addresses and want to make changes to the suffixes
without changing the rest of the address. I know how to use a function to
copy the suffix (or last word in a cell) to another cell. But, I do not know
how to copy everything EXCEPT the suffix (or last word in a cell) to another
cell. Please suggest a formula that will do this. TIA



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking table in Excel to word travis Links and Linking in Excel 1 November 19th 05 02:30 PM
Print Excel charts in Word 2003 with fixed size Phil Charts and Charting in Excel 1 November 3rd 05 04:24 AM
Extracting info from word and displaying in an excel spreadsheet Drew Excel Discussion (Misc queries) 0 March 7th 05 03:49 AM
How to embed Word document into Excel and retain sizing, formatti. Kent Excel Discussion (Misc queries) 0 February 2nd 05 07:37 PM
Embedded word doc changed to image-need to change back to word. cflores Excel Discussion (Misc queries) 0 January 23rd 05 06:45 AM


All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"