Extracting parts of a cell when only certain words appear
Ok brain cramp. I'm going to the Lords of Excel for help with this one.
Lets say:
a1=238 Woodbridge Terrace, Apartment 6,South Hadley, MA 01101
a2=123 Anystreet Rd,Boston, MA 06095
a3=490 Elms St.,Apt 6,Hartford, CT 06090
I'd like to get for results in:
B1=Apartment 6
B2=<blank
B3=Apt 6
As a bonus id like to get
C1=South Hadley
C2=Boston
C3=Hartford
You can probably see by now that source data is inconsistent where not every
line will have an "Apartment" or "Apt". Or am I asking for too much out of
excel? Any help is appreciated.
|