If you are required to extract last word from a string in excel, then you can use combination of various functions. In this article, we will focus on extracting last word & last occurrence of specific character from a cell.
Question: How can I extract the last word as the data I have contains separator as “space”, “comma”, “dash” or any other thing.
For more information on question you can click on this link: Extract Last Word
Following is the snapshot of preferred output data:
We will find the same solution with different formulas.
Let us first find the solution using array.
Note: this is an array formula; therefore, use CTRL + SHIFT + ENTER keys together.
Let us see the second solution.
Let us see the third solution.
Let us see the fourth solution.
Let us see the fifth solution.
In this way, we can use the formula we are comfortable with & get the solution.
Let us take another example in which it is required to find the last occurrence of a specific character.
Question: How can I know the position of the last occurrence of any special character say dot, comma, back slash, etc.
Following is the snapshot of the column A that has multiple “\” & the formula needed to find the position of the last occurrence of back slash (\)
Formula explanation:
In the above scenario, the substring is basically "\" which has a length of 1, so we can leave at the end and use the following formula:
Conclusion: In this way, we can extract last word & last occurrence of the specific character.
If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook.
We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write us at info@exceltip.com
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.