Address disection.

Alphacsulb

Active Member
Joined
Mar 20, 2008
Messages
414
I have 6500 addresses to go though in Column A.

The format of the cell is:

<TABLE style="WIDTH: 188pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=250 border=0 x:str><COLGROUP><COL style="WIDTH: 188pt; mso-width-source: userset; mso-width-alt: 9142" width=250><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 188pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=250 height=17>Laguna Woods, CA 92637-0000</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>Laguna Beach, CA 92651-0000</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>Laguna Woods, CA 92637-0000</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>Midway, UT 84049-0000</TD></TR></TBODY></TABLE>


What would be an easy way to break these up.
Column A to stay as it is.
Column B to be: City
Column C to be: State
Column D to be: Zip Code

Column C and D is easy because those fields are fixed so I can use:
=Right(A1,13) and so forth.

But I dont know how to get the city out. The only thing I am thinking of is that since the city is seperated by the "," then I could get everything to the left of that ",". How do I do that??????
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Here is another question:

I have this address: 110 W 6TH ST APT 304

I am using =LEFT(A1,FIND(" ",A1)-1) to get: 110

What formula would I use to get everything that is to the right of the right " "?

I want: W 6TH ST APT 304

Thanks.
 
Upvote 0
Hi

Try:

=RIGHT(A1,LEN(A1)-FIND(" ",A1))

or

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

That was it! Thanks for your help...However I realized that I have some addresses that are PO BOX I wanted to know if this was possible.

IF A1 starts with a number then =LEFT(A1,FIND(" ",A1)-1) IF not then =A1

And a different formula that says:

If A1 starts with a number then =RIGHT(A1,LEN(A1)-FIND(" ",A1)) IF not then " "

:eek: is that possible?
 
Upvote 0
How about Data>Text to columns...?

That would work if there are uniform delimiters or lengths.
 
Upvote 0

Forum statistics

Threads
1,215,920
Messages
6,127,709
Members
449,399
Latest member
VEVE4014

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