Skip to main content

How to insert brackets around text in a cell?

Author: Xiaoyang Last Modified: 2024-07-22

Sometimes, you might need to enclose text within brackets in Excel, whether for formatting, organizing data, or improving readability. While adding brackets manually to a few cells is manageable, it becomes cumbersome if you need to apply this to many cells. This guide will show you three efficient methods for adding brackets around text in Excel: using the & operator, a streamlined approach with Kutools for Excel, and a VBA code solution for more automated tasks.

screenshot of adding brackets around text in cell 1

Insert brackets around text in a cell with the & operator

When you need to manually insert brackets around text in a cell, using the & operator is a straightforward method. This technique is useful for individual cells or small datasets. By combining text strings with brackets using formulas, you can easily enclose your text without any additional tools. Below, we will walk through the process of using the & operator to add brackets around cell values.

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


Batch insert brackets around text in a range of cells with Kutools

For a more efficient solution, especially when working with large datasets, Kutools for Excel provides a convenient tool to add brackets around text in the original data range with just a few clicks. This method simplifies the task by automating the process, allowing you to apply brackets to multiple cells quickly. We'll guide you through the steps to use Kutools for Excel to enclose text with brackets effortlessly.

After installing Kutools for Excel, go to the Kutools tab and select Text > Add Text to open the Add Text dialog box. Then you need to ocnfigure as follows

  1. Select the range of cells where you want to add brackets around the text.
  2. Enter the left bracket in the Text field.
  3. Select the Before first character option.
  4. Click Apply.
    screenshot of adding brackets around text in cell with Kutools for Excel 1
  5. Enter the right bracket in the Text field.
  6. Choose the Afte last character option, and click OK.
    screenshot of adding brackets around text in cell with Kutools for Excel 2
Result

Then brakets are added around texts in the selected cells as shown in the screenshot below

screenshot of adding brackets around text in cell 1
Note: To use this feature, you should have Kutools for Excel installed on your computer. Go to download Kutools for Excel to get a 30-day free trial with no limitations.

Insert brackets around text in a cell with VBA code

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.


Demo: Insert brackets around text in a cell with Kutools for Excel

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!

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Спасибо большое. Я за пару минут сделал то, что планировал на целую ночь!
This comment was minimized by the moderator on the site
Добрый день, у меня данное выражение Rng.Value = "(" & Rng.Value & ")" вставляет в ячейку "-" (минус) перед значением, а не значение в скобках, если же поставить две скобки, все работает ((
This comment was minimized by the moderator on the site
MAN, You make me save 1 day of work with this info. THANKS A LOOOOOT.
GOD BLESS YOU.
Saludos
This comment was minimized by the moderator on the site
Man, I love this site!! I have learned so much about VBA from this website, and I want to thank you for that,
This comment was minimized by the moderator on the site
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.
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations