Extract ONLY street name with no other text

duteberta

Board Regular
Joined
Jun 14, 2009
Messages
83
Office Version
  1. 365
Platform
  1. MacOS
I've ready many articles on this but cannot find a solution for this. Is there a way to set up a table of values that a formula can reference to avoid? Such as setting up a table with terms such as "N","N. ","North", "Northeast", "Boulevard", etc to avoid when returning the result?

Sp I want to return ONLY the street name as follows and need the proper formula. It's ok if I need 2-3 helper columns to set up the proper result.

Screenshot 2024-04-15 at 3.33.40 PM.png
 
Thank you all! Those are real street names from where I live in Indiana. We have an odd naming convention for our rural roads such as "E 300 N".
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Ok it's not quite working. I made to named ranges like you said and they are called "card" and "suffix". Getting some wrong results...

test2.xlsx
ABCDEFG
1Street AddressExpected OutcomeAttempt1cardsuffix
2100 Independence Boulevard SEIndependenceIndependenceNN
38505 Canterbury Square ECanturburyCanterburySN.
47657 Castleton Farms WestCastleton FarmsCastleton FarmsENE
58238 CR 350 WCR 350CR 350WNW
64116 Crooked Creek OverlookCrooked CreekCrooked CreekSENorth
710228 Cumberland Pointe BlvdCumberland PointeCumberland PointeSWNortheast
85732 E 300 North3005732NENorthwest
93829 E SR 32SR 323829NWS
106383 E Walton DrWalton6383S.
111917 E. State Rd 28State Road 281917SE
1215540 Follow DrFollowFollow DrSW
1317147 Linda Way NWLindaLindaSoutheast
148671 N 500 W5008671Southwest
151301 N 8th St8th1301E
163558 North 900 W9003558E.
17739 N Raven Field CtRaven Field739East
187590 Sea Crest Way NSea Crest7590W
1923050 SR37 NSR3723050W.
206520 W 11th St11th6520West
214455 West 126th St126th4455Street
226643 W 300 North3006643Street
2300 W CR650 SCR65000St.
247869 W CR650 SCR6507869Drive
2579 Wiley StWiley79Drive
26Dr.
27Blvd
28Boulevard
29Way
30Lane
31Ln
32Court
33Ct
34Ct.
35Ave
36Overlook
37Place
38Place
39Circle
40Cir
Sheet1
Cell Formulas
RangeFormula
C2:C25C2=LET(tb,TEXTBEFORE(A2,suffix,,0,0,A2),ta,TEXTAFTER(tb,card,,,,tb),TRIM(TEXTAFTER(TRIM(ta)," ",,,,ta)))
 
Upvote 0
Book2
ABCDE
1Street AddressStreetWord List
2100 Independence Boulevard SEIndependenceBoulevard
38505 Canterbury Square ECanterburySE
47657 Castleton Farms WestCastleton FarmsSquare
58238 CR 350 WCR 350E
64116 Crooked Creek OverlookCrooked CreekWest
710228 Cumberland Pointe BlvdCumberland PointeW
8Overlook
9Blvd
10
Sheet1
Cell Formulas
RangeFormula
B2:B7B2=TEXTJOIN(" ",1,LET(a,TEXTSPLIT(A2," "), b, UPPER(D2:D9), DROP(FILTER(a, BYCOL(--(UPPER(a)=b), LAMBDA(x,SUM(x)=0))),,1)))
 
Upvote 0
Holy crap that is awesome. Dropping some LAMBDA! Thanks so awesome
 
Upvote 0
I'm starting to think it's not possible to get 100% of them with formula. For example, this one breaks the rules where you need the value after the suffix "Rd".
1917 E. State Rd 28 -> State Rd 28 instead of just State.
 
Upvote 0
I'm starting to think it's not possible to get 100% of them with formula.
Yes, I said that with my first reply. If you can get 95% or better, you are doing pretty good.
There are just too many variations and exceptions to be able to expect it to work perfectly in every single scenario.

For example, there are many words that you would typically want to replace that could also be valid street names, like "East Ave.", or "Court St." (two street names in my city).
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,611
Members
449,109
Latest member
Sebas8956

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