How to Concatenate Apostrophe in Excel: 6 Easy Methods

Method 1 – Using Ampersand Operator (&) to Concatenate Apostrophe

Steps:

  • Type the following formula in cell D5.
="'"&B5&"'"&" '"&C5&"'"

The Quotations sit as single apostrophes on both sides of each cell reference (i.e., B5 and C5) while concatenating them as Full Name.

Using Ampersand Operator to Concatenate Apostrophe in Excel

  • Press ENTER then Drag the Fill Handle to come up with Full Names with apostrophes on both sides of First Name and Last Name.

Outputs obtained after using Ampersand operator

Change the orientation of the Full Names may look like apostrophes. You can put single or double Apostrophes between First Name and Last Names to declare them as different entities in Full Names.


Method 2 – Utilizing CONCAT Function to Concatenate Apostrophe

Steps:

  • Insert the following formula in D5.
=CONCAT("'",B5,"'"," '",C5,"'")

Use apostrophes () as Delimiters to differentiate between First Name and Last Name.

Using CONCAT function to Concatenate Apostrophe in Excel

  • Hit ENTER after that Drag the Fill Handle.

All the First Name and Last Name will appear with quoted Apostrophes constituting Full Names as shown in the following picture.

Applying Fill Handle to get the Full Name for remaining employees


Method 3 – Applying the CONCATENATE Function to Concatenate Apostrophe

Steps:

  • Write the following formula in D5.
=CONCATENATE("'",B5,"'"," '",C5,"'")

Applying CONCATENATE function to Concatenate Apostrophe in Excel

  • Press ENTER then drag the Fill Handle.

The Full Names will be concatenated with apostrophes, as demonstrated in the image below.

Final output after using CONACATENATE function and Fill Handle


Method 4 – Implementing CHAR and TEXT Functions with Ampersand Operator

Steps:

  • Use the following formula in cell D6.
=CHAR(39)&TEXT(B6,"")&CHAR(39)&" "&CHAR(39)&TEXT(C6,"")&CHAR(39)

Here, cells B6 and C6 refer to the first cells of the First Name and the Last Name columns respectively.

Formula Breakdown

  • The CHAR function will return the character specified by the code number inside it.
    • 39 → It refers to the number argument of the CHAR function.
    • Output → “‘”.
  • The formula becomes →  “‘”&TEXT(B6,””)&”‘”&” “&”‘”&TEXT(C6,””)&”‘”.
  • In the first TEXT function,
    • B6 → This indicates the value argument.
    • “” → It is the format_text argument.
    • Output → “Jane”.
  • From the second TEXT function,
    • Output → “Doe”.
  • The formula becomes → “‘”&”Jane”&”‘”&” “&”‘”&”Doe”&”‘”.
  • Output → ‘Jane’ ‘Doe’.
  • Hit ENTER from your keyboard and use Excel’s AutoFill feature.

Using CHAR, and TEXT Functions with Ampersand Operator to Concatenate Apostrophe in Excel

Have the Full Names concatenated with the Ampersand operator, as shown in the image below.

Using Fill Handle to get the rest of the outputs


5. Using TEXTJOIN Function

Steps:

  • Type the following formula in D5.
="'"&TEXTJOIN("' '",TRUE,B5,C5)&"'"

“‘ ‘” double apostrophes are the delimiter argument, TRUE is the ignore_empty argument, and B5, C5 are the text references.

Utilizing TEXTJOIN function to Concatenate Apostrophe in Excel

  • Press ENTER then Drag the Fill Handle to bring up the Full Names with apostrophes in between names.

Outputs got after using the TEXTJOIN function and Fill Handle command in Excel

Note: You can place single or multiple Apostrophes between names as delimiters.


Method 6 – Incorporating VBA Macro Code to Concatenate Apostrophe

Steps:

  • Go to the Developer tab from Ribbon.
  • Choose the Visual Basic option from the Code group.

Using Developer option to open VBA editor window

The Microsoft Visual Basic for Applications window will appear on your worksheet.

Microsoft Visual Basic for Applications window

  • Go to the Insert tab in the Microsoft Visual Basic for Applications window.
  • Choose the Module option from the drop-down.

Inserting new Module to write VBA code

  • Write the following code in the newly created Module.
Sub concatenate_apostrophe()
Dim a As Integer, b As Integer, starting_row As Integer
starting_row = 5
b = 2
For a = starting_row To Selection.Rows.Count + (starting_row - 1)
Cells(a, b + 2).Value = "''" & Cells(a, b).Value & "'" & _
" '" & Cells(a, b + 1).Value & "'"
Next a
End Sub

Writing VBA code

Code Breakdown

  • Created a sub-procedure named concatenate_apostrophe.
  • Introduced three variables a, b, and starting_row as integers.
  • Defined the values of the starting_row variable as 5.
  • Initiated a For Next loop to concatenate apostrophes.
  • Closed the For Next loop.
  • Ended the sub-procedure.
  • After writing the code, click on the Save option.

Saving written VBA code

  • Use the keyboard shortcut ALT + F11 to return to the worksheet.
  • Select the dataset and use the keyboard shortcut ALT + F8 to open the Macro dialogue box.
  • Following that, choose the concatenate_apostrophe option in the Macro dialogue box.
  • Click on Run.

Running Macro to Concatenate Apostrophe in Excel

You will have the following outputs as demonstrated in the following image.

Outputs got after using the VBA Macro feature in Excel

 


Download Practice Workbook


Related Articles

Get FREE Advanced Excel Exercises with Solutions!
Maruf Islam
Maruf Islam

MARUF ISLAM is an excellent marine engineer who loves working with Excel and diving into VBA programming. For him, programming is like a superhero tool that saves time when dealing with data, files, and the internet. His skills go beyond the basics, including ABACUS, AutoCAD, Rhinoceros, Maxsurf, and Hydromax. He got his B.Sc in Naval Architecture & Marine Engineering from BUET, and now he's switched gears, working as a content developer. In this role, he creates techy content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo