How to Concatenate Single Quotes in Excel (5 Methods)

To demonstrate these methods, we’ll use a dataset containing information about employee names and departments. Our goal is to concatenate single quotes around the department names and store the results in the range D5:D9. Let’s explore the methods below to achieve this:


Method 1 – Use Ampersand (&) to Concatenate Single Quotes:

STEPS:

  • Select Cell D5 and enter the formula:
="'"&C5&"'"

Use Ampersand to Concatenate Single Quotes in Excel

Note: This formula combines a double quote, a single quote, the department name (from cell C5), and another single quote. The result will be a department name enclosed in single quotes.

So, the general form of the formula can be written as:

=Double Quote Single Quote Double Quote &C5& Double Quote Single Quote Double Quote

  • Press Enter and drag the fill handle down to apply the formula to other cells.

Use Ampersand to Concatenate Single Quotes in Excel

  • You will see concatenated single quotes like the picture below.

Use Ampersand to Concatenate Single Quotes in Excel

Note: To concatenate double quotes, type double quotes in place of single quotes and add two new double quotes on both sides of the formula. So, the formula becomes:

=””””&C5&””””

The result of this formula will be: “Sales”.

Read More: How to Add Single Quotes in Excel


Method 2 – Add Single Quotes with Excel CHAR Function:

STEPS:

  • In cell D5, type the formula:
=CHAR(39)&C5&CHAR(39)

Add Single Quotes with Excel CHAR Function

Here, CHAR(39) represents a single quote. The formula concatenates the single quotes with the department name from cell C5.

  • Press Enter and use the fill handle to copy the formula down.

Add Single Quotes with Excel CHAR Function

  • You will get the desired results.

Add Single Quotes with Excel CHAR Function

Note: To add double quotes, use the formula below:

=CHAR(34)&C5&CHAR(34)

Read More: How to Add Single Quotes and Comma in Excel Formula


Method 3 – Combine Excel CONCATENATE and CHAR Functions:

STEPS:

  • Select cell D5 and enter the formula:
=CONCATENATE(CHAR(39),C5,CHAR(39))

Combine Excel CONCATENATE and CHAR Functions to Insert Single Quotes

This formula achieves the same result as the previous method. The CONCATENATE function joins text strings, and CHAR(39) represents a single quote.

  • Press Enter and drag down the fill handle.

Combine Excel CONCATENATE and CHAR Functions to Insert Single Quotes

  • The results will look like the picture below.

Combine Excel CONCATENATE and CHAR Functions to Insert Single Quotes

Read More: How to Add Single Quotes in Excel for Numbers


Method 4 – Add Single Quotes Using Format Cells Dialog Box:

Add Single Quotes in Excel Using Format Cells Dialog Box

STEPS:

  • Select the cells (e.g., C5:C9) where you want to add single quotes.

Add Single Quotes in Excel Using Format Cells Dialog Box

  • Right-click and choose Format Cells.

Add Single Quotes in Excel Using Format Cells Dialog Box

  • In the Format Cells window, select Number and then choose Custom.
  • Enter ‘@’ in the Type field.
  • Click OK.

Add Single Quotes in Excel Using Format Cells Dialog Box

Note: If you want to add single quotes for numbers, then you need to write ‘#’ in the Type field. For example, if you have 2323 in a cell, then you need to write ‘#’ in place of ‘@’ in the Type field.

  • The selected cells will display the department names enclosed in single quotes.

Add Single Quotes in Excel Using Format Cells Dialog Box

Read More: How to Remove Single Quotes in Excel


Method 5 – Using VBA to Concatenate Single Quotes in Excel:

n Excel, VBA (Visual Basic for Applications) provides users with the capability to perform complex tasks more easily. We can leverage VBA to concatenate single quotes in Excel. Let’s walk through the steps for this method:

STEPS:

  • Go to the Developer tab and select Visual Basic. This action will open the Visual Basic window.

  • Click on Insert in the Visual Basie window.
  • Choose Module.  This will open a new Module window.

  • In the Module window, type the following code:
Sub Concatenate_Single_Quotes()
Range("C5:C9").NumberFormat = "'@'"
End Sub

  • This VBA code sets the number format of the specified range (C5:C9) to display values with single quotes around them.
  • Adjust the range according to your specific needs.
  • If your range contains numbers, use “#” instead of “@” to add single quotes around numeric values.
  • Press Ctrl + S to save the code.
  • “Press F5(to execute the entire subroutine).
  • Alternatively, go to the Developer tab and select Macros and run the code from the Macro window.

  • The specified range (C5:C9) will now display values enclosed in single quotes.

Read More: How to Add Double Quotes and Comma in Excel with CONCATENATE


Download Practice Book

You can download the practice book from here.


 

Related Articles


<< Go Back to Quotes in ExcelConcatenate Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mursalin Ibne Salehin
Mursalin Ibne Salehin

Mursalin Ibne Salehin holds a BSc in Electrical and Electronics Engineering from Bangladesh University of Engineering and Technology. Over the past 2 years, he has actively contributed to the ExcelDemy project, where he authored over 150 articles. He has also led a team with content development works. Currently, he is working as a Reviewer in the ExcelDemy Project. He likes using and learning about Microsoft Office, especially Excel. He is interested in data analysis with Excel, machine learning,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo