Extract Address and City from String

vraman0513

New Member
Joined
Oct 17, 2016
Messages
5
Hello - I am trying to extract the address and city from the following addresses. Could anyone help?

2718 WEST BUCKNER ROAD DALLAS, TX 75237

<colgroup><col></colgroup><tbody>
</tbody>
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
2718 WEST BUCKNER ROAD DALLAS, TX 75237
2718 WEST BUCKNER ROAD DALLAS
=LEFT(A1,SEARCH(",",A1)-1)

<colgroup><col></colgroup><tbody>
</tbody>
 
Upvote 0
I can already extract the zip and state to seperate cells....just need to extract the address and city seperately.
 
Upvote 0
Thanks -- however, is there a way to just extract the city and the address seperately and not together in one cell?
 
Upvote 0
Hi,

try this one :

=RIGHT(SUBSTITUTE(A1,RIGHT(A1,LEN(A1)-FIND(",",A1)+1),""),LEN(SUBSTITUTE(A1,RIGHT(A1,LEN(A1)-FIND(",",A1)+1),""))-FIND("*",SUBSTITUTE(SUBSTITUTE(A1,RIGHT(A1,LEN(A1)-FIND(",",A1)+1),"")," ","*",LEN(SUBSTITUTE(A1,RIGHT(A1,LEN(A1)-FIND(",",A1)+1),""))-LEN(SUBSTITUTE(SUBSTITUTE(A1,RIGHT(A1,LEN(A1)-FIND(",",A1)+1),"")," ","")))))
 
Upvote 0
Thank you!!

How about for something like this without a comma seperating the city and state?

456 N LAWNDALE AVE MOUNTAIN VIEW CA 94043-1716

<tbody>
</tbody>
 
Upvote 0
Thank you!!

How about for something like this without a comma seperating the city and state?

456 N LAWNDALE AVE MOUNTAIN VIEW CA 94043-1716

<tbody>
</tbody>
Actually, the missing comma is the least of your troubles with that one... put the comma in and tell me how you know that city consists of two name as compared to your first example (DALLAS) which only has one word? And if you think you solve that one, does you solution handle cities with three name like SALT LAKE CITY, UTAH
 
Upvote 0
Correct - doesn't work for cities with multiple names, this is one of the additional challenges I was facing.
 
Upvote 0
Correct - doesn't work for cities with multiple names, this is one of the additional challenges I was facing.
The only possible way around this dilemma that I can think of is for you to create a list of all possible street designations (Road, Street, Lane, Circle, etc., etc.) and all of their possible abbreviations (for example, Ave, Av, Ave., Av. for Avenue) and then locate whichever one there is within the text as the break point between the address and the city. But you cannot look for the first one of these that match, rather, you need to find the last one of them (otherwise you will get fooled by STREET ROAD which is a major street name in Philadelphia, Pennsylvania). If you construct that list, we can probably drum up a solution of some kind for you.
 
Upvote 0

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top