亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Table of Contents
Key Points
Introduction to SUBSTITUTE function
Add commas to names in Excel using SUBSTITUTE function
=SUBSTITUTE
=SUBSTITUTE(C9, ", ", ")
Use instance_num parameter in SUBSTITUTE function
=SUBSTITUTE(A3,”2020″,”2021″)
Comparison between SUBSTITUTE and REPLACE
=REPLACE (A2, 7, 4,”2021″)
Frequently Asked Questions
in conclusion
Home Software Tutorial Office Software Add Comma in Excel between Names with SUBSTITUTE Formula

Add Comma in Excel between Names with SUBSTITUTE Formula

May 25, 2025 am 02:40 AM

In an Excel worksheet, you may encounter situations where the last name and first are not separated by commas, and manually adding commas can be a tedious task. Fortunately, this tutorial will teach you how to add commas to names in Excel using the SUBSTITUTE function. The SUBSTITUTE function is a text function used to search and replace text strings in Excel. This is a very useful function if you want to replace old text with new text. Let's start exploring the functions of this function right now.

Key Points

  • Simplified List Format – Use the SUBSTITUTE function to easily insert commas between names without manually editing each entry.
  • Suitable for batch changes – You can quickly apply formulas to multiple cells to clean or format lists more efficiently.
  • Flexible alternative options – SUBSTITUTE can replace spaces, semicolons, or other separators with commas according to your needs.
  • Improve data consistency – Automatically insert commas to ensure consistency and appropriate formatting of name lists for further use.
  • Easy to combine with other functions – You can nest SUBSTITUTE with TRIM or CLEAN functions to get better results when dealing with chaotic data.

Table of contents

Introduction to SUBSTITUTE function

What does it do?

It replaces specific text in a text string, i.e., replaces old text with new text.

Formula decomposition:

=SUBSTITUTE(text, old_text, new_text, [instance_num])

what does that mean:

The SUBSTITUTE function has four parameters – text, old_text, new_text and instance_num. The first three parameters are required, and the fourth is optional.

  • text – The original text you want to replace the text. Can be the result of a cell reference, a text string, or another formula.
  • old_text – the text you want to replace
  • new_text – the text you want to replace
  • instance_num – The number of occurrences of the old text you want to replace, i.e. the first occurrence, the second occurrence, etc. If left blank, replace all occurrences of instances.

Let's use an example to understand how to use the SUBSTITUTE function and how to use this function to add commas to names in Excel.

Add commas to names in Excel using SUBSTITUTE function

I remember countless times when I received a name list from HR, there was no comma separation between last name and first name.

This gives me a headache! ! !

I had to manually edit each name so that it looks like , .

As a result, the SUBSTITUTE formula in Excel can easily accomplish this task!

In the following example, we have a list of names. We want to replace spaces with commas and spaces. The SUBSTITUTE formula can do this for us!

Follow these steps to learn how to add commas to names in Excel:

Step 1: We need to enter the SUBSTITUTE function next to the cell where we want to clean up the data:

=SUBSTITUTE

Add Comma in Excel between Names with SUBSTITUTE Formula

Step 2: SUBSTITUTE Parameters:

text

Which cell do we want to change?

References to a cell containing text or values:

=SUBSTITUTE(C9,

Add Comma in Excel between Names with SUBSTITUTE Formula

old_text

What text/characters do we want to replace?

We want to change the space , so enter it:

=SUBSTITUTE(C9, ” “,

Add Comma in Excel between Names with SUBSTITUTE Formula

new_text

What text/characters do we want to replace it with?

We want to replace it with commas and spaces , so enter it:

=SUBSTITUTE(C9, ", ", ")

Add Comma in Excel between Names with SUBSTITUTE Formula

Step 3: Do the same for the remaining cells, drag the SUBSTITUTE formula down by using the left mouse button.

Note that all names have now been changed to have the comma you need:

Add Comma in Excel between Names with SUBSTITUTE Formula

This will easily replace the space between the name with commas and spaces.

Now that you have confidently added commas to names in Excel using the SUBSTITUTE function, let's continue to understand how to use the instance_num parameter in the formula.

Use instance_num parameter in SUBSTITUTE function

Let's take an example to get a deeper understanding of this function.

Add Comma in Excel between Names with SUBSTITUTE Formula

In cell A2 you have the text – “Sales for Quarter 1 Product 1” and you want to replace it with the text “Sales for Quarter 2 Product 2”. You can use functions

=SUBSTITUTE(A2,"1″,"2″)

Add Comma in Excel between Names with SUBSTITUTE Formula

Suppose, you want to replace only the first 1 and 2, i.e. replace Sales for Quarter 2 Product 1 with Sales for Quarter 2 Product 1. You can use functions

=SUBSTITUTE(A3,"1″,"2″,1)

By adding the instance_num parameter, you have restricted Excel to replace only the first 1's occurrence.

Add Comma in Excel between Names with SUBSTITUTE Formula

Again, you can replace only the second 1 and 2 with the formula

=SUBSTITUTE(A4,"1″,"2″,2)

Add Comma in Excel between Names with SUBSTITUTE Formula

Comparison between SUBSTITUTE and REPLACE

Both functions are used to replace old text with new text. The main difference between the two is:

  • When you know which word to change, you should use the SUBSTITUTE function
  • When you know the position and length of the character you want to change, you should use the REPLACE function.

Let's learn more about the REPLACE function to learn more about the differences!

Formula decomposition:

Syntax of REPLACE function:

=REPLACE (old_text, start_num, num_chars, new_text)

what does that mean:

  • old_text – The text string you want to find the character you want to replace.
  • start_num – where you want the replacement function to occur
  • num_chars – the number of characters you want to replace
  • new_text – replace text

example:

Suppose you have a text "Excel 2020" in cell A2 that you want to change to "Excel 2021". You want to replace 4 characters starting from the 7th character and you want the replacement text to be "2021". You can do this using the REPLACE function:

=REPLACE (A2, 7, 4,”2021″)

Add Comma in Excel between Names with SUBSTITUTE Formula

Since you also know the text you want to replace, using the SUBSTITUTE function can also do the job.

=SUBSTITUTE(A3,”2020″,”2021″)

Add Comma in Excel between Names with SUBSTITUTE Formula

Frequently Asked Questions

What does the SUBSTITUTE function do in Excel?
The SUBSTITUTE function replaces specific text in a string with new text, such as replacing spaces with commas between names.

Can SUBSTITUTE handle multiple types of separators at once?
SUBSTITUTE can only be replaced one at a time, but you can nest multiple SUBSTITUTE functions to handle different separators.

How to replace spaces between names with commas?
You can insert commas and spaces between names in cell A1 using the formula =SUBSTITUTE(A1, " ", ", ") .

Does the SUBSTITUTE function change all spaces, including spaces between first and last name?
Yes, it replaces all instances, so use it with caution if you want to replace only certain spaces (in this case you may need a more advanced formula).

Is there a way to do this automatically for the entire column?
Yes, after writing the SUBSTITUTE formula for one cell, you can drag it down to apply to all other cells.

in conclusion

In this tutorial, you have learned how to add commas to names in Excel using the SUBSTITUTE function. You can learn more about this function by reading this blog on how to clean up data using the SUBSTITUTE function .

The above is the detailed content of Add Comma in Excel between Names with SUBSTITUTE Formula. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the meeting time limit for the free version of Teams? What is the meeting time limit for the free version of Teams? Jul 04, 2025 am 01:11 AM

MicrosoftTeams’freeversionlimitsmeetingsto60minutes.1.Thisappliestomeetingswithexternalparticipantsorwithinanorganization.2.Thelimitdoesnotaffectinternalmeetingswhereallusersareunderthesameorganization.3.Workaroundsincludeendingandrestartingthemeetin

how to group by month in excel pivot table how to group by month in excel pivot table Jul 11, 2025 am 01:01 AM

Grouping by month in Excel Pivot Table requires you to make sure that the date is formatted correctly, then insert the Pivot Table and add the date field, and finally right-click the group to select "Month" aggregation. If you encounter problems, check whether it is a standard date format and the data range are reasonable, and adjust the number format to correctly display the month.

How to Fix AutoSave in Microsoft 365 How to Fix AutoSave in Microsoft 365 Jul 07, 2025 pm 12:31 PM

Quick Links Check the File's AutoSave Status

How to change Outlook to dark theme (mode) and turn it off How to change Outlook to dark theme (mode) and turn it off Jul 12, 2025 am 09:30 AM

The tutorial shows how to toggle light and dark mode in different Outlook applications, and how to keep a white reading pane in black theme. If you frequently work with your email late at night, Outlook dark mode can reduce eye strain and

how to repeat header rows on every page when printing excel how to repeat header rows on every page when printing excel Jul 09, 2025 am 02:24 AM

To set up the repeating headers per page when Excel prints, use the "Top Title Row" feature. Specific steps: 1. Open the Excel file and click the "Page Layout" tab; 2. Click the "Print Title" button; 3. Select "Top Title Line" in the pop-up window and select the line to be repeated (such as line 1); 4. Click "OK" to complete the settings. Notes include: only visible effects when printing preview or actual printing, avoid selecting too many title lines to affect the display of the text, different worksheets need to be set separately, ExcelOnline does not support this function, requires local version, Mac version operation is similar, but the interface is slightly different.

How to Screenshot on Windows PCs: Windows 10 and 11 How to Screenshot on Windows PCs: Windows 10 and 11 Jul 23, 2025 am 09:24 AM

It's common to want to take a screenshot on a PC. If you're not using a third-party tool, you can do it manually. The most obvious way is to Hit the Prt Sc button/or Print Scrn button (print screen key), which will grab the entire PC screen. You do

Where are Teams meeting recordings saved? Where are Teams meeting recordings saved? Jul 09, 2025 am 01:53 AM

MicrosoftTeamsrecordingsarestoredinthecloud,typicallyinOneDriveorSharePoint.1.Recordingsusuallysavetotheinitiator’sOneDriveina“Recordings”folderunder“Content.”2.Forlargermeetingsorwebinars,filesmaygototheorganizer’sOneDriveoraSharePointsitelinkedtoaT

how to find the second largest value in excel how to find the second largest value in excel Jul 08, 2025 am 01:09 AM

Finding the second largest value in Excel can be implemented by LARGE function. The formula is =LARGE(range,2), where range is the data area; if the maximum value appears repeatedly and all maximum values ??need to be excluded and the second maximum value is found, you can use the array formula =MAX(IF(rangeMAX(range),range)), and the old version of Excel needs to be executed by Ctrl Shift Enter; for users who are not familiar with formulas, you can also manually search by sorting the data in descending order and viewing the second cell, but this method will change the order of the original data. It is recommended to copy the data first and then operate.

See all articles