Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Pull address data out of excel field

Posted on 2013-05-19
2
Medium Priority
?
604 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 51

Assisted Solution

by:Gustav Brock
Gustav Brock earned 1000 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 93

Accepted Solution

by:
Patrick Matthews earned 1000 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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

722 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