DEV Community

Andrews
Andrews

Posted on • Originally published at geekexcel.com on

Extract Text Before First Comma or Space in Excel Office 365!!

In this post, we will explain the way to extract text before the first comma or space in Excel Office 365 with formula syntax, explanation, and clear-cut examples. You just follow the instructions that are given below and get the text string easily in your worksheet. Let’s see them below.

Formula Syntax and Explanation:

  • Use the below-given formulas to get the text string before comma or space.

To get the text before the first space:

=LEFT(A1,FIND(” “,A1,1)-1)

To extract the text before the first space:

=LEFT(A1,FIND(“,”,A1,1)-1)

  • LEFT Function It extracts the first character (starting from the left side) or characters from the given string based on the number you specified.
  • FIND Function This function is used to find out the one text string inside the other.

Practical Examples:

Let’s see how the above-given formula works for your reference.

Example 1: Get Text Before Space

  • For instance, you can see four text strings in cell A1 with space between them.

Input
Input

  • Then, you have to apply the formula in cell C1 and click the Enter key.

Apply the formula
Apply the formula

  • After clicking the Enter button, you will see extracted text string in Cell C1 as shown in the below image.

Output
Output

Example 2: Get Text Before Comma

  • In the below screenshot, you can see the example words in Cell A1.

Input Text Strings
Input Text Strings

  • Now, you need to apply the formula in Cell C1 and press Enter key.

Enter the formula
Enter the formula

  • Finally, you will get the output text before the comma in the selected cell as shown in the below image.

Output
Output

Conclusion:

In this useful post, we have explained the way to extract text before the first comma or space in Excel Office 365 with formula syntax, explanation, and clear-cut examples. Kindly, leave your queries/suggestions in the below comment section. To learn more, check out our website *Geek Excel!! *

Top comments (0)