Separating data within a cell

thewiseguy

Well-known Member
Joined
May 23, 2005
Messages
818
Office Version
  1. 365
Platform
  1. Windows
Hello All,

How would I take a cell that contains data such as this:

247 W Passaic St, Maywood, NJ 07607-1257.

And separating it into 3 cells - Address 1, City, State and Zip


Thank you in advance

twg
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,450
Try something like this...

Book1
ABCD
1Full AddressStreetCityState Zip
2247 W Passaic St, Maywood, NJ 07607-1257247 W Passaic StMaywoodNJ 07607-1257
Sheet1
<br /><br /><table cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B2</th><td style="text-align:left">=LEFT(<font color="Blue">A2,FIND(<font color="Red">",",A2</font>)-1</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C2</th><td style="text-align:left">=TRIM(<font color="Blue">MID(<font color="Red">SUBSTITUTE(<font color="Green">A2,",",REPT(<font color="Purple">" ",50</font>)</font>),50,50</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D2</th><td style="text-align:left">=TRIM(<font color="Blue">MID(<font color="Red">SUBSTITUTE(<font color="Green">A2,",",REPT(<font color="Purple">" ",50</font>)</font>),100,50</font>)</font>)</td></tr></tbody></table></td></tr></table>
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,286
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Try


Excel 2010
DEF
1addressCityzip
2247 W Passaic StMaywoodNJ 07607-1257.
Sheet2
Cell Formulas
RangeFormula
D2=LEFT(A1,FIND(",",A1,1)-1)
E2=TRIM(LEFT(RIGHT(SUBSTITUTE(A1,",",REPT(" ",100)),200),100))
F2=TRIM(RIGHT(SUBSTITUTE(A1,",",REPT(" ",LEN(A1))),LEN(A1)))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,629
Messages
5,838,454
Members
430,549
Latest member
jayjay2022

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
Top