+ Reply to Thread
Results 1 to 2 of 2

Extracting text from a string

  1. #1
    Forum Contributor
    Join Date
    03-18-2008
    Posts
    123

    Extracting text from a string

    Hi,
    I have addresses of cities in a col.

    Sample Address: Badulipara Jardaguri, KAIBORTA GAON, KAIBORTA GAON, IN, ASSAM, GOLAGHAT, 785619, India

    I want to extract last four text within "comma or ','" i.e ASSAM GOLAGHAT 785619 INDIA

    I tried doing it through text to column but I didnt worked for me as the address are quite absurd and are not having consistent length. I just need to extract last 4 text within comma. That would work for me.

    Please assist.

    Thanks

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Extracting text from a string

    Hello try,

    =TRIM(RIGHT(SUBSTITUTE(A1,",",REPT(" ",250)),1000))

    Change A1 to your actual cell reference
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

+ 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