Solved

Parse Address in an Excel Cell

Posted on 2014-01-15
7
1,089 Views
Last Modified: 2014-01-20
Hi. I need to separate an excel cell that has a full address Column "G" into separate cells, I'm having a difficult time figuring it out. I need separate cells for STREET ADDRESS, CITY, STATE, ZIP.

310 E Main St, 110 Charlottesville VA 22902

Into separate cells for
STREET = 310 E Main St
CITY = 110 Charlottesville
STATE = VA
ZIP = 22902

Book1.xlsx
0
Comment
Question by:GravitaZ24
  • 3
  • 2
7 Comments
 
LVL 22

Accepted Solution

by:
Flyster earned 300 total points
ID: 39784458
Here's the formulas used to get the results you were looking for:

STREET: =LEFT(G1,FIND(",",G1)-1)
CITY: =SUBSTITUTE((TRIM(MID(G1,LEN(N1)+2,LEN(G1)-LEN(N1)-10))),",","")
STATE: =LEFT(RIGHT(G1,8),2)
ZIP: =RIGHT(G1,5)

This works as long as your data is uniform.

Flyster
Book1.xlsx
0
 
LVL 8

Expert Comment

by:itjockey
ID: 39784733
This only suggestion ...if there is case of more then 5 number of pin

State=TRIM(RIGHT(SUBSTITUTE(G1," ",REPT(" ",99)),99))


Thanks
0
 

Author Comment

by:GravitaZ24
ID: 39785523
Thank you, Worked perfectly!
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:GravitaZ24
ID: 39785530
itjockey, sorry I requested they give you points for your help.
0
 
LVL 8

Expert Comment

by:itjockey
ID: 39786051
No I had just given suggestion and that is not for points.Mr.Flyster's solution is totally matched to what you are seeking.Actually I am not an expert I just see the questions and solutions. For my knowledge.

Thank You
0
 
LVL 8

Assisted Solution

by:itjockey
itjockey earned 100 total points
ID: 39796004
State =LEFT(RIGHT(G1,LEN(Q1)+3),2)
Zip    =TRIM(RIGHT(SUBSTITUTE(G1," ",REPT(" ",99)),99))
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now