Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Pete Provencher
 
Posts: n/a
Default Splitting City State Zip

Excel 2000:

I'm trying to split the city state zip field into individual fields. I was
able to get the zip and state by using the folllowing formulas:

State: =LEFT(RIGHT(M2,10),3)

Zip: =RIGHT(M2,5)

But, I can't seem to get the city. The problem being no comma betwee the
city and St and cities with two name:

Loris SC 29573
Myrtle Beach SC 29577
Little River SC 29588

Any help will be appreciated.


Pete Provencher


  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

How about

=TRIM(LEFT(TRIM(A1),LEN(TRIM(A1))-9))

If your addresses are all well-formed (e.g., no extra spaces), that
reduces to

=LEFT(A1,LEN(A1)-9)


In article ,
"Pete Provencher" wrote:

Excel 2000:

I'm trying to split the city state zip field into individual fields. I was
able to get the zip and state by using the folllowing formulas:

State: =LEFT(RIGHT(M2,10),3)

Zip: =RIGHT(M2,5)

But, I can't seem to get the city. The problem being no comma betwee the
city and St and cities with two name:

Loris SC 29573
Myrtle Beach SC 29577
Little River SC 29588

Any help will be appreciated.


Pete Provencher

  #3   Report Post  
Pete Provencher
 
Posts: n/a
Default

That worked1 Thanks a lot.

Pete Provencher
"JE McGimpsey" wrote in message
...
How about

=TRIM(LEFT(TRIM(A1),LEN(TRIM(A1))-9))

If your addresses are all well-formed (e.g., no extra spaces), that
reduces to

=LEFT(A1,LEN(A1)-9)


In article ,
"Pete Provencher" wrote:

Excel 2000:

I'm trying to split the city state zip field into individual fields. I

was
able to get the zip and state by using the folllowing formulas:

State: =LEFT(RIGHT(M2,10),3)

Zip: =RIGHT(M2,5)

But, I can't seem to get the city. The problem being no comma betwee the
city and St and cities with two name:

Loris SC 29573
Myrtle Beach SC 29577
Little River SC 29588

Any help will be appreciated.


Pete Provencher



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
splitting number strings in excel Bob Excel Worksheet Functions 1 February 3rd 05 04:33 AM
Zip - State - County dandigger Excel Discussion (Misc queries) 2 January 26th 05 09:54 PM
splitting and rejoining text in cells sh0t2bts Excel Worksheet Functions 3 January 26th 05 06:50 PM
What Functions should be used taxmom Excel Worksheet Functions 4 January 21st 05 05:03 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 01:37 AM


All times are GMT +1. The time now is 09:02 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"