Consulting

Results 1 to 4 of 4

Thread: Extract STATE from address string

  1. #1
    VBAX Regular
    Joined
    Sep 2008
    Posts
    29
    Location

    Extract STATE from address string

    Hi Guys,

    Need to extract STATEs from addresses which is in a single coloumn. How can I extract just the STATES to a separate States. For example: I am attaching a ss here. Thank you for your help here.

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    Since your example has a double space before each state abbreveiation, this formula will work, without gyrations to deal with irregular City Names or postal codes.

    =TRIM(MID(A2,FIND(" ",A2&" "),4))

    (Copy pasting this formula from the website will not work, the BB software removes the second space between each of the quote marks in the formula. )

  3. #3
    VBAX Regular
    Joined
    Sep 2008
    Posts
    29
    Location
    Thank you for your reply.
    This formula works for Cities with one word name, but cities with two words or multiple words (for example, New York, North Olmsted,Del Ray Beach, etc.), this formula does not work. Do you have any other solutions? Thank you!

  4. #4
    VBAX Regular
    Joined
    Sep 2008
    Posts
    29
    Location
    Nevermind Mike....it worked just as you suggested. Case closed!! Thank you very much...and good night!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •