#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default City State Zip

When I use Text to Columns this separates fine until it gets to Oklahoma
City, Fort Smith, San Diego, Little Rock, etc. Then I get a separate column
for City, Smith, Diego, Rock. Raw data had City State and Zip all separated
by Spaces, no commas or tabs. The database is too long to do all of these
manually. Please Help Soon??!

Need this:
Little Rock AR 72207

to be:
|Little Rock|AR|72207|

Not:
|Little|Rock|AR|72207
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default City State Zip

Throw it all in one column and then parse it. The city can be had by
subtracting the State and Zip or Len-9 and you can take the right 5 for
the Zip. As for the State use the starting point of LEN-8 and take 2 chars.

Texas Nuckols wrote:

When I use Text to Columns this separates fine until it gets to Oklahoma
City, Fort Smith, San Diego, Little Rock, etc. Then I get a separate column
for City, Smith, Diego, Rock. Raw data had City State and Zip all separated
by Spaces, no commas or tabs. The database is too long to do all of these
manually. Please Help Soon??!

Need this:
Little Rock AR 72207

to be:
|Little Rock|AR|72207|

Not:
|Little|Rock|AR|72207


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default City State Zip

Sorry, Bob I - I don't speak Greek...Can you translate please? I don't know
parses and len-8s and 9s. Thanks

"Bob I" wrote:

Throw it all in one column and then parse it. The city can be had by
subtracting the State and Zip or Len-9 and you can take the right 5 for
the Zip. As for the State use the starting point of LEN-8 and take 2 chars.

Texas Nuckols wrote:

When I use Text to Columns this separates fine until it gets to Oklahoma
City, Fort Smith, San Diego, Little Rock, etc. Then I get a separate column
for City, Smith, Diego, Rock. Raw data had City State and Zip all separated
by Spaces, no commas or tabs. The database is too long to do all of these
manually. Please Help Soon??!

Need this:
Little Rock AR 72207

to be:
|Little Rock|AR|72207|

Not:
|Little|Rock|AR|72207



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default City State Zip

Ok, put the string Little Rock AR 72207 in A1
now in B1 put
=LEFT(A1,LEN(A1)-9)
in C1 goes
=MID(A1,LEN(A1)-7,2)
and D1 has
=RIGHT(A1,5)



Texas Nuckols wrote:

Sorry, Bob I - I don't speak Greek...Can you translate please? I don't know
parses and len-8s and 9s. Thanks

"Bob I" wrote:


Throw it all in one column and then parse it. The city can be had by
subtracting the State and Zip or Len-9 and you can take the right 5 for
the Zip. As for the State use the starting point of LEN-8 and take 2 chars.

Texas Nuckols wrote:


When I use Text to Columns this separates fine until it gets to Oklahoma
City, Fort Smith, San Diego, Little Rock, etc. Then I get a separate column
for City, Smith, Diego, Rock. Raw data had City State and Zip all separated
by Spaces, no commas or tabs. The database is too long to do all of these
manually. Please Help Soon??!

Need this:
Little Rock AR 72207

to be:
|Little Rock|AR|72207|

Not:
|Little|Rock|AR|72207




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
separate an address street/city,state,zip within a cell? Puzzled Excel Worksheet Functions 6 July 27th 07 12:28 PM
Compare City and State to Master List Not Excelerated[_2_] Excel Worksheet Functions 2 May 30th 07 01:44 AM
zip code to city, state function xcelentform Excel Worksheet Functions 1 May 18th 06 11:59 PM
city, state, zip in same cell whs2002 Excel Discussion (Misc queries) 2 April 29th 05 07:02 AM
Splitting City State Zip Pete Provencher Excel Worksheet Functions 2 February 7th 05 09:33 PM


All times are GMT +1. The time now is 06:51 AM.

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"