Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Extract address data

PLEASE, I need a formula to extract the data of an address string.
I know that I could use the =LEFT or =MID or =RIGHT formulas, but since the
lenght of the data varies, I will need something better than that.
The positive thing that the database I have is consistent as show below:
comma and space after the City, and space after the STate.


I have this in A1:
A1= Nashville, TN 37211

I would like a formula that extract the data from A1 giving me these results:
B1= Nashville
C1= TN
D1= 37211


THANKS!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Extract address data

Hi,
in B1

=TRIM(LEFT(A1,FIND(",",A1)-1))

in C1
=MID(A1,SEARCH(" ",A1)+1,3)

in D1

=TRIM(RIGHT(A1,FIND(" ",A1)-6))

hope this helps


"Marco Margaritelli" wrote:

PLEASE, I need a formula to extract the data of an address string.
I know that I could use the =LEFT or =MID or =RIGHT formulas, but since the
lenght of the data varies, I will need something better than that.
The positive thing that the database I have is consistent as show below:
comma and space after the City, and space after the STate.


I have this in A1:
A1= Nashville, TN 37211

I would like a formula that extract the data from A1 giving me these results:
B1= Nashville
C1= TN
D1= 37211


THANKS!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Extract address data

Try these...

B1: =LEFT(A1,LEN(A1)-10)
C1: =MID(A1,LEN(A1)-7,2)
D1: =RIGHT(A1,5)

--
Rick (MVP - Excel)


"Marco Margaritelli" wrote in
message ...
PLEASE, I need a formula to extract the data of an address string.
I know that I could use the =LEFT or =MID or =RIGHT formulas, but since
the
lenght of the data varies, I will need something better than that.
The positive thing that the database I have is consistent as show below:
comma and space after the City, and space after the STate.


I have this in A1:
A1= Nashville, TN 37211

I would like a formula that extract the data from A1 giving me these
results:
B1= Nashville
C1= TN
D1= 37211


THANKS!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract email(s) from address field Eli[_4_] Excel Discussion (Misc queries) 3 November 7th 14 10:42 AM
How to extract email address in hyperlink Brossyg Excel Worksheet Functions 6 January 27th 07 03:32 PM
How to extract the address of a chart serie Vinz Charts and Charting in Excel 1 December 6th 06 05:24 PM
How to extract a web address from a hyperlink cell? El Rebelde Excel Discussion (Misc queries) 2 November 16th 06 04:44 PM
How do I extract the address from a hyperlink in excell ? SMcLarenOr Excel Discussion (Misc queries) 0 April 26th 06 10:18 PM


All times are GMT +1. The time now is 02:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"