Thread: City State Zip
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default City State Zip

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