Delete everything 2nd comma from right

attv

New Member
Joined
Mar 10, 2021
Messages
35
Office Version
  1. 2019
Platform
  1. Windows
Hi Everyone! I need help with creating a function.

Below is what I have in column A. Now in column B I want a function that will delete everything, counting the second comma from the right side. So basically I only want city names and states

NOW: Abilene, TX5211 Bonita Ave, Allen, TX
WHAT I WANT: Allen, TX

Does anyone know what will work?


LOCATION​
Abilene, TX​
5211 Bonita Ave, Allen, TX​
1002 Raintree Circle, Allen, TX​
955 Hwy 121, Suite 130, Allen, TX​
5701 Time Square Blvd. Suite 190, Amarillo, TX​
643 Frenchtown Rd, Argyle, TX​
18477 West Lake Houston Parkway, Atascocita, TX​
3355 Bee Cave Road, Suite 502, Austin, TX​
12515 Research Blvd #100, Austin, TX​
1801 S. Mopac Suite 100, Austin, TX​
10309 Hansa Cove, Austin, TX​
609 Castle Ridge Rd #440, Austin, TX​
1908 McCloskey St, Austin, TX​
10526 W. Parmer Lane, Austin, TX​
1801 S Mopac Suite 100, Austin, TX​
14010 US Hwy 183, Austin, TX​
3801 Berkman Dr Apt A, Austin, TX​
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
AB
1LOCATION
2Abilene, TXAbilene, TX
35211 Bonita Ave, Allen, TXAllen, TX
41002 Raintree Circle, Allen, TXAllen, TX
5955 Hwy 121, Suite 130, Allen, TXAllen, TX
65701 Time Square Blvd. Suite 190, Amarillo, TXAmarillo, TX
7643 Frenchtown Rd, Argyle, TXArgyle, TX
818477 West Lake, Houston Parkway, Atascocita, TXAtascocita, TX
93355 Bee Cave Road, Suite 502, Austin, TXAustin, TX
1012515 Research Blvd #100, Austin, TXAustin, TX
111801 S. Mopac Suite 100, Austin, TXAustin, TX
1210309 Hansa Cove, Austin, TXAustin, TX
13609 Castle Ridge Rd #440, Austin, TXAustin, TX
141908 McCloskey St, Austin, TXAustin, TX
1510526 W. Parmer Lane, Austin, TXAustin, TX
161801 S Mopac Suite 100, Austin, TXAustin, TX
1714010 US Hwy 183, Austin, TXAustin, TX
183801 Berkman Dr Apt A, Austin, TXAustin, TX
Master
Cell Formulas
RangeFormula
B2:B18B2=TRIM(MID(A2,FIND("^",SUBSTITUTE(","&A2,",","^",LEN(","&A2)-LEN(SUBSTITUTE(","&A2,",",""))-1)),100))
 
Upvote 0
Solution
Thank you! It worked. It's going to save me much time
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
You could possibly also have used this.

21 03 11.xlsm
AB
1LOCATION
2Abilene, TXAbilene, TX
35211 Bonita Ave, Allen, TXAllen, TX
41002 Raintree Circle, Allen, TXAllen, TX
5955 Hwy 121, Suite 130, Allen, TXAllen, TX
65701 Time Square Blvd. Suite 190, Amarillo, TXAmarillo, TX
7643 Frenchtown Rd, Argyle, TXArgyle, TX
818477 West Lake, Houston Parkway, Atascocita, TXAtascocita, TX
93355 Bee Cave Road, Suite 502, Austin, TXAustin, TX
1012515 Research Blvd #100, Austin, TXAustin, TX
111801 S. Mopac Suite 100, Austin, TXAustin, TX
1210309 Hansa Cove, Austin, TXAustin, TX
13609 Castle Ridge Rd #440, Austin, TXAustin, TX
141908 McCloskey St, Austin, TXAustin, TX
1510526 W. Parmer Lane, Austin, TXAustin, TX
161801 S Mopac Suite 100, Austin, TXAustin, TX
1714010 US Hwy 183, Austin, TXAustin, TX
183801 Berkman Dr Apt A, Austin, TXAustin, TX
City State
Cell Formulas
RangeFormula
B2:B18B2=TRIM(RIGHT(SUBSTITUTE(", "&A2,", ",","&REPT(" ",100)),200))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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