what is a good formula to extract a city, state and zip? Some have commas, some don't. Some cities are more than one word too which makes it not work for some.
Here is what I've done but it only works when it is a one worded city with a comma:
example:
Gurnee, IL 60031
=Left(B1,SEARCH(",",B1)-1)
---> result : Gurnee
example:
San Diego, CA
-->what is a formula I can use with the above one? Maybe throw in an IF statement to do with the spaces?
Here is what I've done but it only works when it is a one worded city with a comma:
example:
Gurnee, IL 60031
=Left(B1,SEARCH(",",B1)-1)
---> result : Gurnee
example:
San Diego, CA
-->what is a formula I can use with the above one? Maybe throw in an IF statement to do with the spaces?