Skip to main content

How to extract text before/after space or comma only in Excel?

When you want to extract the text before or after the space from the list as shown as below, do you have a good way to get it done? Let me tell you some trick ways to extract text before or after space only in Excel.


Extract text before or after space with formula in Excel

You can quickly extract the text before space from the list only by using formula.

Select a blank cell, and type this formula =LEFT(A1,(FIND(" ",A1,1)-1)) (A1 is the first cell of the list you want to extract text) , and press Enter button.

Tips:
(1) If you want to extract text before or after comma, you can change " " to ",".
(2) If you want to extract the text after space only, use this formula =MID(A1,FIND(" ",A1)+1,256).
(3) This method extracts text by the first space in specified cells. If more than one spaces exist in the cell, for example the "Katty J James", the formula =MID(A1,FIND(" ",A1)+1,256) will extract all characters after the first space.

note ribbon Formula is too complicated to remember? Save the formula as an Auto Text entry for reusing with only one click in future!
Read more…     Free trial

Extract numbers (or text) only from one cell/column into different columns/rows

Kutools for Excel enhances its Split Cells utility and supports to batch extract all text characters or numbers from one cell/column into two columns/rows.


Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now


Extract text before or after space with Kutools for Excel

If you have installed Kutools for Excel, you can use its Extract Text utility to quickly extract text before or after space only from a list.

Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Free Trial Now!

1. Select the list and click Kutools > Text > Extract Text. See screenshot:

2. In the pop-up dialog, type * and a space into the Text box, click Add button, only check this new added rule in the Extract list section, and click the Ok button.
Tip: If you want to extract text after space only, type a space and follow * into the Text box in this step.

3. In another popping dialog, please specify the first cell address of destination range you will output extracted data, and click OK button. Till now, you can see the texts before space have been extracted only.
     
Note: If you want to extract text before or after comma, you can type *, or ,* into the Text box.


Extract text before space and after space/comma separately at the same time

Kutools for Excel supports another utility of Split Cell utility to help us extract both text before space/comma and text after space/comma, and output them into different cells. Please do as follows:

Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Free Trial Now!

1. Select the list of text strings that you will extract from, and click the Kutools > Text > Split Cells.

2. In the opening Split Cells dialog box, specify the split type in the Type section, check one split separator in the Split by section, and click the Ok button. See screenshot above:
In our case, we check the Split to Columns option and Space option, and click the Ok button. And now the list of text string is split to column or rows based on space. See screenshot below:

Note: If you need to extract text before or after comma, please check the Other option in the first Split Cells dialog box, and type the comma "," into below box.


Demo: Extract text before or after space,comma or other delimiters by Kutools for Excel


Kutools for Excel includes more than 300 handy tools for Excel, free to try without limitation in 30 days. Download and Free Trial Now!

Relative Articles:

Best Office Productivity Tools

Supports Office/Excel 2007-2021 and 365  |  Available in 44 Languages  |  Easy to Uninstall Completely

Popular Features: Find/Highlight/Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns     Move Columns   |   Unhide Columns   |   Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need Is Just A Click Away...

Supercharge Your Excel Skills: Experience Efficiency Like Never Before with Kutools for Excel  (Full-Featured 30-Day Free Trial)

kte tab 201905

60-Day Unconditional Money-Back GuaranteeRead More... Free Download... Purchase... 

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day! (Full-Featured 30-Day Free Trial)
60-Day Unconditional Money-Back GuaranteeRead More... Free Download... Purchase... 
 
Comments (31)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
thanks a lot
This comment was minimized by the moderator on the site
hello olivia john
hello olivia john david
hello olivia john robert more

Excel contains the data we need, but I'd like a value of end to appear before words like as.

john
david
more
Please provide any formula's clarification.
This comment was minimized by the moderator on the site
Hi, Nandakumar, I do not understand you problem. Do you want to extract the end word from each string or like to add the end value of the front cell before words in next cell?
This comment was minimized by the moderator on the site
hello olivia john
hello olivia john david
hello olivia john robert more

Excel contains the data we need, but I'd like a value of end to appear before words like as.

hello olivia john john
hello olivia john david david
hello olivia john robert more more

Please provide any formula's clarification.
This comment was minimized by the moderator on the site
Tried your example, I needed to read from cell D2 and read something before a space

=LEFT(D2,(FIND(" ","D2",1)-1))

and got: #VALUE!
This comment was minimized by the moderator on the site
What is the first "data" location for the sentence in row 6? ..Please answer me 🙏
This comment was minimized by the moderator on the site
Thank you!
This comment was minimized by the moderator on the site
Muchas gracias
This comment was minimized by the moderator on the site
Hello, thanks for this article, but is there a way for a mid function to work on the second space?
This comment was minimized by the moderator on the site
Hi Aland,
For example there is a sentence in the cell B3, you can extract the text after the second space from this cell with formula =MID(B3,FIND(" ",B3,FIND(" ",B3)+1),256)
This comment was minimized by the moderator on the site
Mehar Kusum Manav Maa Singh Bisht

what is formula for separate above words...
This comment was minimized by the moderator on the site
Hi Mehar singh bisht,
Do you mean split “Mehar Kusum Manav Maa Singh Bisht”, and place every word in a separate cell? You can select the cell containing the content, and click Data > Split to Column (set the delimiter as space) to split it.
This comment was minimized by the moderator on the site
If i buy a licence then for how many days will it be valid for me?
This comment was minimized by the moderator on the site
Hi Abbas Aziz,
For license issues, please contact
This comment was minimized by the moderator on the site
Hi, I want to know the formula which can give me the text after few characters. how to retrive that? can someone help with this Regards/- atul
This comment was minimized by the moderator on the site
Dear Atul, If u need exactly after certain character, (say 20 words incl space). You can go for DATA tab, Then select the column you want changes... then go to TEXT TO COLUMNS ribbon. After that a dialogue box will open and u can see Fixed width, Select it. Click next, then u will see 10, 20, 30..., click on 20 (or how many words u need after), then next. FINISH. CAUTION: Insert some blank columns after the required column to avoid any data loss
This comment was minimized by the moderator on the site
Hello, Perhaps you can help me? I like your information above, but as usual I have a different split column issue. So... I'm looking for a way to split a cell of text into to. The split must not come more that 30 characters (Including spaces) from the left but must be at a space or the immediate previous space to the 30th character point. So if the cell contained: "EMERGENCY MU/INITIAL FILL TO CONDENSER CTRL VAL" The 30th Character is the "C" of Condenser so the cell will split between "TO" and "Condenser" How do I write this code please? Many thanks for your help, Tim
This comment was minimized by the moderator on the site
SNJAI21470,,499,PO15135,8907617138985,Manuf How to extract third comma seprate value in other cell
This comment was minimized by the moderator on the site
Thank you so much!! so helpful!
This comment was minimized by the moderator on the site
I'm wanting to create a unique order number/side mark using text from different cells: EXAMPLE: Account: AB Contractor: Buffalo Run Address: 11453 Main St. In this example lets say everything before the colons are the column name and to the right of the colon is the data within the column. The unique ID/sidemark I want to create is using these cells. so the result is: ABBR11453, the break down of this ID: AB = extracted from Cell 1 (Accounts) BR = extracted from Cell 2 (Contractor), 1st letter of the first 2 words in this cell i.e. B for Buffalo and R for Run 11453 = extracted from Cell 3, only the numbers in the address I've watched tutorials and using the CONCATENATE, LEFT, MID and other functions and I'm not quite getting it. Can you PLEASE HELP!
This comment was minimized by the moderator on the site
I want to thank you, It took me over 3- 4 hours looking into different websites, help instructions and formula list, and finally you have the answer I needed. =LEFT(A1,(FIND(" ",A1,1)-1)) As quickbooks merged the part numbers with the descriptions in most of the inventory reports, I needed to build a report with vlookups and other formulas to get the inventory to show in days of stock but I was not able to extract the part number from the reports until I found your formula. Advertise it as a work around in Quickbooks reports and your website will be more popular. Cheers.
This comment was minimized by the moderator on the site
This was very helpful...!!!!
This comment was minimized by the moderator on the site
Hi, I am having trouble finding the formula for the following example I want to make a new column and have only the last name no first, middle initial, comma, or MD: John P. Smith, MD Thanks, Starla H.
This comment was minimized by the moderator on the site
what is the purpose of the 256 at the end of the formula in the first example?
This comment was minimized by the moderator on the site
In the first example about extracting the text after space only with the formula =MID(A1,FIND(" ",A1)+1,256). What is the purpose of the 256 in the formula?
This comment was minimized by the moderator on the site
256 would return all character count upto 256 as the result of the formula, if the result exceeds 256 (Including Spaces and special Characters) even then the formula will return 256 characters of your required result. you can change the number 256 with whatever character count you want to extract.
This comment was minimized by the moderator on the site
Hello How can I extract text after first space to next space ? thank you
This comment was minimized by the moderator on the site
Try Trim(A1) or Clean(A1) where A1 is the cell you want to clean
This comment was minimized by the moderator on the site
try Trim(A1) or clean(A1) where A1 is the cell you want to clean spaces from
This comment was minimized by the moderator on the site
Hi Sir Good Evening I want to know informatio about to remove space text after cell. kindly suggest me good formula about it. i have urgent need of this. Thanks, Vikram jangir
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations