Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default Help with Address Formula

I am looking for a formula that will return all words except for the last
word.
Eample:. in cell A1 I have: Castleton Parkway Blvd--I want to return in
cell A2: Castleton Parkway

TIA




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Help with Address Formula

One way:

=MID(A1,1,LEN(A1)-FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),LEN(A1)
-LEN(SUBSTITUTE(A1," ","")))))



Steve M wrote:

I am looking for a formula that will return all words except for the last
word.
Eample:. in cell A1 I have: Castleton Parkway Blvd--I want to return in
cell A2: Castleton Parkway

TIA


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Help with Address Formula

Try this:
=LEFT(A1,FIND("^",SUBSTITUTE(A1," ","^",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))


"Steve M" wrote:

I am looking for a formula that will return all words except for the last
word.
Eample:. in cell A1 I have: Castleton Parkway Blvd--I want to return in
cell A2: Castleton Parkway

TIA





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default Help with Address Formula

When I use this formula it returns Cast. I might mention also that there
would usually be a number in front of the street address (e.g. 125 Castleton
Parkway Blvd--in such a case I would want the result of the formula to be
125 Castleton Parkway).
"Dave Peterson" wrote in message
...
One way:

=MID(A1,1,LEN(A1)-FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),LEN(A1)
-LEN(SUBSTITUTE(A1," ","")))))



Steve M wrote:

I am looking for a formula that will return all words except for the last
word.
Eample:. in cell A1 I have: Castleton Parkway Blvd--I want to return
in
cell A2: Castleton Parkway

TIA


--

Dave Peterson



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Help with Address Formula

Just a minor modification of Dave's formula:

=MID(A1,1,FIND(CHAR(1),SUBSTITUTE(A1,"
",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)

HTH
Kostis Vezerides

Steve M wrote:
When I use this formula it returns Cast. I might mention also that there
would usually be a number in front of the street address (e.g. 125 Castleton
Parkway Blvd--in such a case I would want the result of the formula to be
125 Castleton Parkway).
"Dave Peterson" wrote in message
...
One way:

=MID(A1,1,LEN(A1)-FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),LEN(A1)
-LEN(SUBSTITUTE(A1," ","")))))



Steve M wrote:

I am looking for a formula that will return all words except for the last
word.
Eample:. in cell A1 I have: Castleton Parkway Blvd--I want to return
in
cell A2: Castleton Parkway

TIA


--

Dave Peterson




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Help with Address Formula

Thanks for the correction...

And just because of the unfortunate line wrap:

=MID(A1,1,FIND(CHAR(1),
SUBSTITUTE(A1," ",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)



vezerid wrote:

Just a minor modification of Dave's formula:

=MID(A1,1,FIND(CHAR(1),SUBSTITUTE(A1,"
",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)

HTH
Kostis Vezerides

Steve M wrote:
When I use this formula it returns Cast. I might mention also that there
would usually be a number in front of the street address (e.g. 125 Castleton
Parkway Blvd--in such a case I would want the result of the formula to be
125 Castleton Parkway).
"Dave Peterson" wrote in message
...
One way:

=MID(A1,1,LEN(A1)-FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),LEN(A1)
-LEN(SUBSTITUTE(A1," ","")))))



Steve M wrote:

I am looking for a formula that will return all words except for the last
word.
Eample:. in cell A1 I have: Castleton Parkway Blvd--I want to return
in
cell A2: Castleton Parkway

TIA

--

Dave Peterson


--

Dave Peterson
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
Is it possible? DakotaNJ Excel Worksheet Functions 25 September 18th 06 09:30 PM
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
How do I use cell contents as an address in a formula tomeck Excel Worksheet Functions 1 December 20th 05 05:46 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Help! Formula to find the address of particular value in sheet xcelion Excel Worksheet Functions 2 July 13th 05 12:41 PM


All times are GMT +1. The time now is 05:39 AM.

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

About Us

"It's about Microsoft Excel"