Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to insert brackets around text in a cell?

For certain purpose, may be sometimes, you need to insert brackets around the text within a cell to enclose the cell value. It is easy for you to insert brackets into a few cells, but, if there are lots of cells needed to be surrounded with brackets, how could you deal with the problem quickly and conveniently in Excel?

Insert brackets around text in a cell with formula

Insert brackets around text in a cell with VBA code

Insert brackets around text in a cell with Kutools for Excel



The following simple formula may help you to add the brackets around the text within a cell, please do as follows:

1. Please enter this formula ="("&A2&")" into a blank cell besides your data, C2, for instance, see screenshot:

doc add brackets 1

2. Then press Enter key to get the result, and then select the cell C2, drag the fill handle down to the cells that you want to apply this formula, all the cell values have been inserted with the brackets around, see screenshot:

doc add brackets 2


If you are familiar with the VBA code, I can create a VBA code for you to sole this task.

1. Hold down ALT + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Insert brackets around text in a cell

Sub addbrackets()
'Updateby20150706
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
Rng.Value = "(" & Rng.Value & ")"
Next
End Sub

3. Then press F5 key to execute this code, a prompt box is popped out to remind you selecting the data range that you want to add the brackets, see screenshot:

doc add brackets 3

4. And then click OK, all the selected cells have been inserted brackets around at once.


If you are interested in other handy add-ins for Excel, Kutools for Excel may do you a favor, with its Add Text function, you can quickly add any characters into the cell contents at any position.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. 

After installing Kutools for Excel, please do as follows:

1. Select the data range that you want to insert brackets.

2. Click Kutools > Text > Add Text, see screenshot:

doc add brackets 4 4

3. In the Add Text dialog box, enter the half opening bracket “(” into the Text box, and then select Before first character under the Position, then click Apply button, see screenshot:

doc add brackets 5 5

4. The half opening brackets have been inserted before each selected text value, and the dialog box is still opened, go on entering the half closing bracket “)” into the Text box, and select the After last character option, then click Ok button, see screenshot:

doc add brackets 6 6

5. And the brackets have been inserted into the cell values.

Note:

With this Add Text feature, you can also insert the brackets into any position of the cell contents. For Example, I want to insert the brackets around the text after the fourth character of the cell, please do as follows:

1. In the Add Text dialog box, please type the half opening bracket “(” into the Text box, and choose Specify option, then enter the specific number of the position that you want to insert the bracket, and then click Apply button to finish this step, see screenshot:

doc add brackets 7 7

2. Then insert the half closing bracket “)”into the Text box, and choose After last character option, and now, you can preview the results, in the right list box, see screenshot:

doc add brackets 8 8

3. At last, click Ok button to close this dialog, and the brackets have been inserted around the text at specific position as you need.

Tips: If you check Skip non-text cells option in the dialog, the adding text won’t be inserted into the non-text cells.

Click to know more details about this Add Text feature.

Download and free trial Kutools for Excel Now !


Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 80% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Василина · 5 months ago
    Добрый день, у меня данное выражение Rng.Value = "(" & Rng.Value & ")" вставляет в ячейку "-" (минус) перед значением, а не значение в скобках, если же поставить две скобки, все работает ((
  • To post as a guest, your comment is unpublished.
    Ludis · 7 months ago
    MAN, You make me save 1 day of work with this info. THANKS A LOOOOOT.
    GOD BLESS YOU.
    Saludos
  • To post as a guest, your comment is unpublished.
    Conrad · 2 years ago
    Man, I love this site!!
    I have learned so much about VBA from this website, and I want to thank you for that,
  • To post as a guest, your comment is unpublished.
    Harry Harper · 2 years ago
    Brackets inserted around a column of numbers causes Excel to consider the numbers as credits and changes the display from, for example, 123.45 to -123.45.