Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

Excel: How to expand cell to show all contents when click

Author Sun Last modified

In some cases, if the cell content is longer than the width of the cell and there are values in the next column cells, only parts of content are shown as the below screenshot shown. For avoiding changing the width and height of the cells, you can click the cell and view whole contents in the formula bar. But if the formula bar is hidden or shorter than the contents, how to do it? Here introduces two methods which can show the cell content in a textbox when clicking at it.

A screenshot showing a cell with truncated content in Excel

Expand cell to show all contents by insert a textbox Active X Controls

Expand cell to show all contents by using Bigger Formula Bar of Kutools for Excel

Note: the methods provided in this tutorial are tested in Excel 2021, there may be some differences in different Excel versions.


Expand cell to show all contents by insert a textbox Active X Controls

1. Activate the worksheet that you want to expand cell, click Developer > Insert > Text Box (ActiveX Controls).
A screenshot of the Insert Text Box (ActiveX Controls) option under the Developer tab in Excel

If there is no Developer tab in the ribbon, please display it at first, please view this tutorial How To Show/Display Developer Tab In Excel Ribbon

2. Then drag the cursor to draw a textbox with a width and height that can show the longest contents of cells. Remember this textbox’s name, here is TextBox1.
A screenshot showing a textbox being drawn in Excel to display cell content

3. Right-click at the textbox, and click Properties from the context menu. Then in Properties pane, choose True from drop-down lists in the MultiLine and WordWrap sections. Then close the Properties pane.
A screenshot of the Properties option on the context menu  >>>  A screenshot of the Properties pane with MultiLine and WordWrap settings selected for the textbox in Excel

Or you can select True from the drop-down list in AutoSize section in Properties pane, the textbox will be auto sized based on the length of the cell contents you click.

4. Right-click at the sheet name tab in the status bar, and click View Code from the context menu.

5. In the Microsoft Visual Basic for Applications window, copy and paste below code to the blank script.

VBA: Expand cell to show contents

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'UpdatebyExtendoffice
Dim xRgAddress As String
xRgAddress = "A1:B4" 'the range this VBA work, if you leave it is blank, it work for whole sheet
If xRgAddress = "" Then
  With TextBox1
        .Top = Target.Top
        .Left = Target.Offset(, 1).Left
        .Text = Target.Text
        .Visible = True
    End With
Else
    If Intersect(Target, Range(xRgAddress)) Is Nothing Then
        TextBox1.Visible = False
    Else
        With TextBox1
            .Top = Target.Top
           .Left = Target.Offset(, 1).Left
            .Text = Target.Text
            .Visible = True
        End With
    End If
End If
End Sub

A screenshot of the VBA editor window with the Worksheet_SelectionChange code for expanding cell content in Excel

Notice that TextBox1 is the name of the textbox you drew, and A1:B4 is the range this code work, change them as you need.

6. Go back to the sheet, click Developer > Design Mode to exist design mode.
A screenshot of the Design Mode option under the Developer tab in Excel

Now when you click at the cell, the textbox will appear next to it, and show whole contents of the cell.
A GIF showing how clicking on a cell in Excel expands its content in a textbox


Expand cell to show all contents by using Bigger Formula Bar of Kutools for Excel

If you have installed Kutools for Excel, the Bigger Formula Bar it provided will show all contents of the cell in a popped box when you click as long as you active it by clicking Kutools > Bigger Formula Bar.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

A GIF demonstrating Kutools' Bigger Formula Bar displaying all cell contents in Excel

Tips:

1. With the Bigger Formula Bar, except to view contents of the active cell, also you can edit the cell contents in the Bigger Formula Bar.

2. You can resize the Bigger Formula Bar by dragging the right down corner of the Bar.

3. If you select more than one cells, only the contents of the first cell of the selection are shown in Bigger Formula Bar.

More details about the Bigger Formula Bar, please visit its tutorial.


Other Operations (Articles)

How To Turn Off Auto Complete
Here is an option in Excel that can stop the auto complete.

How To Reduce Excel File Size?
Sometimes, it will take minutes to open or save if the Excel file is too large. For solving this problem, here in this tutorial, it tells you how to reduce the Excel file size by removing the contents or formats which are unnecessary or never used.

How To Auto Complete Cells From Another Table
In this tutorial, it is talking about how to auto complete other column cells from a table in another sheet after entering one column value.

How to apply shading to odd or even (alternative) rows/columns in Excel?
While designing a worksheet, many people tend to apply shading to odd or even (alternative) rows or columns in order to make the worksheet more visual. This article will show you two methods to apply shading to odd or even rows/columns in Excel.

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
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

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...


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!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in