+ Reply to Thread
Results 1 to 5 of 5

Help with formula - pull state abbreviation out of string of text

  1. #1
    Registered User
    Join Date
    05-10-2019
    Location
    Houston, TX
    MS-Off Ver
    365
    Posts
    5

    Help with formula - pull state abbreviation out of string of text

    If I have this string of data, what is a formula I can use to just pull the state abbreviation out of the string? Or is there anything you could suggest?

    --Circuit ID #266..Z Loc: 111 N. Post Oak LN, Houston, TX 77024
    --Circuit ID #791..5805 Chimney Rock Rd.Houston, Texas 77081

    Considering there is more than one comma in these, I cannot do the basic search formula that I would use.
    The 2nd example has the state spelled out. Maybe we can back into it from the zip code?

  2. #2
    Registered User
    Join Date
    05-10-2019
    Location
    Houston, TX
    MS-Off Ver
    365
    Posts
    5

    Re: Help with formula - pull state abbreviation out of string of text

    I did create this lookup table. The StateAbb column would be what I'd want returned, if the criteria of State, Zip is found. This is the comma and space after the city name, the state abbreviation, space and first digit of zip code.

    ST, ZIP StateAbb
    , AL 3 AL
    , AR 7 AR
    , AZ 8 AZ
    , CA 9 CA
    , CO 8 CO
    , CT 06 CT
    , DC 2 DC
    , GA 3 GA
    , LA 7 LA
    , MA 0 MA
    , MD 2 MD
    , MI 4 MI
    , MS 3 MS
    , NC 2 NC
    , ND 5 ND
    , NV 8 NV
    , NY 1 NY
    , OH 4 OH
    , OK 7 OK
    , PA 1 PA
    , SC 2 SC
    , TN 3 TN
    , TX 7 TX
    , VA 2 VA
    , WV 2 WV
    , WY 8 WY

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Help with formula - pull state abbreviation out of string of text

    This will get you the state
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-10-2019
    Location
    Houston, TX
    MS-Off Ver
    365
    Posts
    5

    Re: Help with formula - pull state abbreviation out of string of text

    Thank you!

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Help with formula - pull state abbreviation out of string of text

    You're welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Formula to change full state name to abbreviation
    By 47magic in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-25-2020, 05:55 PM
  2. Formula to pull #word from a long text string
    By BJhawks20 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-02-2014, 08:46 AM
  3. Advanced Split Function: Need to pull text string in quotes, within a text string
    By Zamboni in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-27-2013, 04:38 PM
  4. [SOLVED] Formula to pull first word out of string of text
    By kenadams378 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-24-2013, 05:24 AM
  5. Replies: 4
    Last Post: 01-22-2011, 07:33 AM
  6. Abbreviation to Text help. Example tb=Trainer/Burch Forgotten formula.
    By bburch in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-10-2010, 08:41 AM
  7. [SOLVED] spell out state name from an abbreviation
    By julieb in forum Excel General
    Replies: 2
    Last Post: 05-19-2005, 01:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1