• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

I want to extract taluka name from address list

I don't want VBA code.

Please share simple mid, left, right and find formula to extract taluka name from address list.
Sample data attached for your reference.
I am not able to get taluka name in all rows. Text highlighted in red shows I am getting other details apart from taluka name.
 

Attachments

Please find the attached updated file..where I have used the MID function with Search..where I am searching for the value TEH and determining the length where the word DIST is available..in some cases where there is no word named DIST, I am considering the length of the text to determine the number of characters to extract..

Hope this helps!!
 

Attachments

One more since I had written it:

Put it in cell B2 as per your attached and drag it down

TRIM(RIGHT(SUBSTITUTE(A2,"-",REPT(" ",LEN(A2))),LEN(A2)))
 
I looked at Ramesh's file and found that there were 6 instances where his formula did not return the TalukaName - part of the problem is an inconsistency with the data - DISTT vs. DIST in a couple of instances. However it is not all of the issue ...

I approached it in a slightly different manner - I searched for the final "-" in the string and used MID to remove the next 50 characters - could also have used LEN and LEFT which I think would have been better on reflection. However I am also returning one result that disagrees with your TalukaName - but it appears that you may have two similar names -
TEH-PHULERA DIST JAIPUR
and
TEH-PHULERA DIST-JAIPUR

I have uploaded the file
 

Attachments

Back
Top