Complicated Text String Question

aus10fek

New Member
Joined
Sep 29, 2011
Messages
3
I have a cell with the value Western Washington University - 516 High St. - Bellingham, WA 98225 ( in bold ). in this text string i have a university name, street address, city, state abv. and zip. I need to extract each individual value in to its own cell, the format of the text string will be the same every time university name followed by a space and a dash then another space then the street address then another space, dash, space, followed by the city and a comma, then the states 2 letter abbreviation and last is the zip.

I used the right and left formulas to get the university name and the zip code from the ends but i am having difficulty with the middle of this text string extract.

Help!!?

Austin
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Welcome to the board.

Try Data > Text to columns, with hyphen as the delimiter.
 
Upvote 0
With the entire string in A1, the following formula will extract the middle portion when it is bounded by a space, a dash, and a space.

Code:
=MID(A1,FIND(" - ",A1)+3,FIND("*",SUBSTITUTE(A1," - ","*",2))-FIND(" - ",A1)-3)
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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