Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
One way:
A1: Little Rock AR 72207 B1: =LEFT(TRIM(A1),LEN(TRIM(A1))-9) C1: =MID(TRIM(A1),LEN(TRIM(A1))-7,2) D1: =RIGHT(TRIM(A1),5) Copy down as far as necessary. Copy and Edit/Paste Special/Values columns B:D In article , 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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
before you do the text to columns use a helper column assuming your data is
in column A =if(len(A1)-len(substitute(A1," ",""))=3,substitute(A1," ","-",1),A1) copy paste down copy and paste special values test to columns on this helper column note if you have names with three words you might have to repeat "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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
For the city
=LEFT(E2,LEN(E2)-8) For the state =MID(E2,LEN(E2)-7,2) For the Zip =RIGHT(E2,5) Then Copy and Paste Special Values to get rid of the formulas. HTH Regards, Howard "Texas Nuckols" wrote in message ... 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
City State Zip | Excel Discussion (Misc queries) | |||
Compare City and State to Master List | Excel Worksheet Functions | |||
zip code to city, state function | Excel Worksheet Functions | |||
city, state, zip in same cell | Excel Discussion (Misc queries) | |||
Splitting City State Zip | Excel Worksheet Functions |