Managing long text in Excel can be challenging when content gets cut off or appears cluttered. Expanding cells automatically ensures that all data is visible, making spreadsheets cleaner, easier to read, and more organized.
Benefits of Expanding Cells in Excel
- Enhances Readability: Ensures all text is fully visible, avoiding truncation.
- Boosts Professionalism: Creates clean, organized spreadsheets for reports.
- Prevents Errors: Displays complete data to avoid misinterpretation.
- Saves Time: Auto-fit features eliminate manual resizing.
- Adapts to Dynamic Data: Adjusts to varying text lengths automatically.
- Accessibility: Improves legibility for all users, including those with visual impairments.
Steps to Make Rows/Columns Fit Text Automatically in Excel
Initially, we have a table with column names “Name” and “Address".

When we enter the data in the cells the data does not get fully fitted in the cells.

Follow these steps:
Method 1: Using VBA
Step 1: Right-click on the sheet name in the bottom-left corner.

Step 2: Now select View Code.

Step 3: Select Worksheet from the drop-down menu as shown in the image.

Step 4: we will see a console window with some code.

Now, Enter the below code of the line in the console on the second line.
Cells.EntireColumn.AutoFit

Now close the window from the file menu.

Step 5: To check if the code is working or not simply click on any cell and press Enter. we’ll see that the Column width is now changed as per the length of the data.

Below video will help we to better understand these steps:
Note: To make this feature available permanently for this sheet simply save the file once. So, later, whenever we open the sheet we will still have this feature.
Method 2: Using Wrap Text
Wrap Text breaks long text into multiple lines within a cell, increasing row height to display all content without changing column width.
Step 1: Open our worksheet and identify cells with long text (e.g., B2 with a product description).
Step 2: Select the cell(s) by clicking them or dragging over a range (e.g., B2:B10).
Step 3: Go to the Home tab.
Step 4: In the Alignment group, click the Wrap Text button (it toggles on/off).
Step 5: Observe the text wrapping within the cell and the row height adjusting automatically.
Step 6: Optionally, adjust column width manually (see Method 5) for better appearance.