City, ST ZIP need to separate into 3 fields

J

JB1981

Hi All ~

Need to separate this kind of data into 3 fields

Los Angeles, CA 90038

I found this bit of code which ALMOST does what i need it to

For the city, use
=LEFT(A1,FIND(",",A1)-1)
For the state, use
=RIGHT(A1,LEN(A1)-FIND(",",A1)-1)


but it comes back with the State and Zip still in the same field and
there is no coma between I can use to select. Is there a way to get it
to grab only numbers?

THANKS!
JB
 
G

Guest

For the State:

=MID(A1,FIND(",",A1,1)+2,2)

For the Zip (assuming it is always 5 digits)

=RIGHT(A1,5)

HTH,
Elkar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top