+ Reply to Thread
Results 1 to 6 of 6

Extracting Text in a string of text

  1. #1
    Registered User
    Join Date
    05-28-2004
    Location
    New York City
    Posts
    20

    Unhappy Extracting Text in a string of text

    Happy Holidays to All!

    How do I extract a concatenated field so I have exactly what I need. I've used the Left and Right functions, but I need to extract more precisely without having to guess the number of characters. For example:

    New York, NY 10019 I want to extract out the "NY" or the state. How do I do that given I may have multiple city and states?

    Thanks for any help

  2. #2
    RagDyeR
    Guest

    Re: Extracting Text in a string of text

    This will give you the 2 characters (state) that follows the comma:

    =MID(A1,FIND(",",A1)+2,2)

    --

    HTH,

    RD
    =====================================================
    Please keep all correspondence within the Group, so all may benefit!
    =====================================================

    "walkerdayle" <[email protected]>
    wrote in message
    news:[email protected]...

    Happy Holidays to All!

    How do I extract a concatenated field so I have exactly what I need.
    I've used the Left and Right functions, but I need to extract more
    precisely without having to guess the number of characters. For
    example:

    New York, NY 10019 I want to extract out the "NY" or the state. How
    do I do that given I may have multiple city and states?

    Thanks for any help


    --
    walkerdayle
    ------------------------------------------------------------------------
    walkerdayle's Profile:
    http://www.excelforum.com/member.php...o&userid=10021
    View this thread: http://www.excelforum.com/showthread...hreadid=494602



  3. #3
    Registered User
    Join Date
    05-28-2004
    Location
    New York City
    Posts
    20

    I'll Give it a try

    Thanks, I'll give it a try

  4. #4
    Registered User
    Join Date
    05-28-2004
    Location
    New York City
    Posts
    20

    It WORKS :)

    Thank you so very much. One more question, how can I do the same, but extracting the City only. For example, Bronx, NY 10451 or White Plains, NY 10463? I've used the Left but it doesn't get the precise name like White Plains.

    Thanks

  5. #5
    David Billigmeier
    Guest

    Re: Extracting Text in a string of text

    Try:

    =LEFT(A1,SEARCH(",",A1)-1)


    --
    Regards,
    Dave


    "walkerdayle" wrote:

    >
    > Thank you so very much. One more question, how can I do the same, but
    > extracting the City only. For example, Bronx, NY 10451 or White
    > Plains, NY 10463? I've used the Left but it doesn't get the precise
    > name like White Plains.
    >
    > Thanks
    >
    >
    > --
    > walkerdayle
    > ------------------------------------------------------------------------
    > walkerdayle's Profile: http://www.excelforum.com/member.php...o&userid=10021
    > View this thread: http://www.excelforum.com/showthread...hreadid=494602
    >
    >


  6. #6
    Registered User
    Join Date
    05-28-2004
    Location
    New York City
    Posts
    20

    Talking Everything Works!!!

    Thanks for all of your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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