Avatar of al4629740
al4629740
Flag for United States of America asked on

Text to column address in excel but maintain apt #

I have two problems on this sample attachment of an excel table.

In the address column, I want to separate the city, state and zip.  However, when I use the "Text to columns" feature, it also separates the Apt # into an additional column creating a problem.  Is there a way to separate the city, state and zip while leave the apt or suite attached to the address?
VBAMicrosoft ExcelMicrosoft OfficePower BI

Avatar of undefined
Last Comment
Martin Liss

8/22/2022 - Mon
Martin Liss

I have two problems on this sample attachment of an excel table.


You forgot to upload the attachment. If you switch to the Beta you won't have that problem again.

al4629740

ASKER
Actually its one problem.  sorry
Temp.xlsx
Martin Liss

Try this.


29170441.xlsm

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Tom Farrar

Another option.  Used Power Query (Get and Transform) to do this.  You can add more data to the Original Data tab, and then right click and refresh the Result tab and it should give you all the information including the new lines you added.
EE.xlsx
al4629740

ASKER

Hey Martin, that works well, but the Suite# disappears.  Would it be able to stay in the field if it was Apt or Suite?

al4629740

ASKER

Tom, How do I do the power query once its open?

⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Tom Farrar

Not sure what you mean "once its open".  Right now you can just add information to the Original Data and right-click the Result and say refresh and all should be good.  Your columns on the Original Data need to remain the same.

Now as far as how to use Power Query (Get and Transform in Excel 2016), there are many videos on how to use it.  In the case for you, I used the parse fields on columns starting with the data on the right (zip, state, city, etc) and worked toward the left.  It is a good tool and does far more than just parsing data.  It is basically a tool for cleaning up data before putting it into a well-formed table(s) which are ultimately used in Power Pivot or Power BI.
ASKER CERTIFIED SOLUTION
Martin Liss

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
al4629740

ASKER

Thank you both.  

Martin Liss

You’re welcome and I’m glad I was able to help.


If you expand the “Full Biography" section of [url="http://www.experts-exchange.com/M_258447.html"]my profile[/url] you’ll find links to some articles I’ve written that may interest you.


Marty - Microsoft MVP 2009 to 2017

        Experts Exchange Most Valuable Expert (MVE) 2015, 2017

        Experts Exchange Top Expert Visual Basic Classic 2012 to 2019

        Experts Exchange Top Expert VBA 2018, 2019

        Experts Exchange Distinguished Expert in Excel 2018

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes