Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / October 2006

Tip: Looking for answers? Try searching our database.

macro for address

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vince cash - 13 Oct 2006 18:22 GMT
i want to move part of an address to another column,

711 W Fairground Rd #3
414 Chestnut St
109 Locust Grove Dr. Apt. 4
522 Folkstone Dr
2996 Polo Club Blvd apt 2
316 Princess Cir #6
2404 Shandon Dr

i need  711 w fairground rd to be in column G and in column F i need #3  
same for  109 locust grove dr. needs to be in G and the APT 4 in F.
Ron Rosenfeld - 13 Oct 2006 19:02 GMT
>i want to move part of an address to another column,
>
[quoted text clipped - 8 lines]
>i need  711 w fairground rd to be in column G and in column F i need #3  
>same for  109 locust grove dr. needs to be in G and the APT 4 in F.

We need to know the identifying features of the portion you want stripped out.
In your example, it appears as if that is represented by either the " #" and
everything following; or " Apt" and everything following, or " apt" and
everything following.

If that is the case, and if those values don't appear prior to the end, then
you could use a Regular Expression formula.  First download and install
Longre's free morefunc.xll add-in from http://xcell05.free.fr/

Then, assuming your data is in A1,

G1:    =REGEX.SUBSTITUTE(A1,"\s(#|Apt).*",,,,FALSE)
F1:    =REGEX.MID(A1,"(#|Apt).*",,FALSE)

--ron

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.