Add comma after first word in a cell in Excel
To add a comma after the first word only in a cell, you can use a combination of the REPLACE and the FIND functions in Excel.
How to add comma after the first word in a cell in Excel?
Supposing you have a list of names as the below screenshot shot, and now you only want to add comma after the surname in each cell, you can do as follows step by step to get it down.
Generic Formula =REPLACE(A1,FIND(" ",A1),0,",") Arguments A1: Represents the cell containing the text you want to add comma after the first word; How to use this formula?
1. Select a blank cell such as D3 to output the result.
2. Enter the below formula into it and press the
Enter key. And then drag the result cell all the way down to apply it to other cells. =REPLACE(B3,FIND(" ",B3),0,",") How this formula works? =REPLACE(B3,FIND(" ",B3),0,",") 1. : The FIND function returns the starting position of space in text string "Doe Jane A". Here the result is 4, which means that the first space is in the 4th position in "Doe Jane A". FIND(" ",B3) 2. : Here use the REPLACE function to add a comma to the 4th positon in "Doe Jane A" and finally get the result as Doe, Jane A. REPLACE(B3,4,0,",") Related functions Excel REPLACE function The Excel REPLACE function in Excel can help you to find and replace characters based on given location from text string with a new text. Excel FIND function The Excel FIND function is used to find a string within another string, and returns the starting position of the string inside another one. Related formulas The Best Office Productivity Tools Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you. Designed for 1500 work scenarios, helps you solve 80% Excel problems. Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands. Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes. 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. One second to switch between dozens of open documents! Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand. Increases your productivity by 50% when viewing and editing multiple documents. Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.