This article is about how to extract the first N number of words from a string in Microsoft Excel by using formulas. To solve this problem we will use TRIM, LEFT, FIND and SUBSTITUTE functions.
Let's see why we will use all of above mentioned formulas:-
FIND function helps to return the placed number at which a specific character or text string is first found.
LEFT function return the specified character from the defined cells from the left side of the string.
TRIM function is used to remove extra spaces from the cell or range.
SUBSTITUTE function is used to replace the old text with new text.
Let’s take an example to understand how we can extract all text before the tilde symbol (^).
This symbol appears at different locations in each string.
Example 1: We have a list in column A. We want to extract all text before the tilde (^) symbol whether it is text, number or symbols. In this case, the number of characters we have to extract for each row vary. It’s the same as extracting “N” number of words from a string, as the “N” can vary from string to string.
Follow below given steps:-
This is how we can extract a variable number of characters from a string in Microsoft Excel.
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 email@example.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.