Solved

Pull address data out of excel field

Posted on 2013-05-19
2
560 Views
Last Modified: 2013-05-20
I have column of address in the format:

Street Address, City, State such as:

10675 Scripps Poway Pkwy, San Diego, CA

In Column C I need just the street address (everything before the first comma)

I'll post different questions for column City.
0
Comment
Question by:cansevin
2 Comments
 
LVL 49

Assisted Solution

by:Gustav Brock
Gustav Brock earned 250 total points
ID: 39178870
In your query you can use:

SELECT
  Mid([YourField],1,InStr([YourField],",")-1) AS Address,
  Mid(Mid([YourField],InStr([YourField],",")+1),1,InStr(Mid([YourField],InStr([YourField],",")+1),",")-1) AS City
FROM YourTable;

/gustav
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 250 total points
ID: 39179908
Assuming this is actually in Excel...

=LEFT(A2,FIND(",",A2)-1)
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

919 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

15 Experts available now in Live!

Get 1:1 Help Now