Expand Cells to Fit the Text Automatically in Excel
Last Updated :
18 Aug, 2025
Excel is a tool for managing tabular data, but entering lengthy text can create display issues. Expanding cells to fit text automatically saves time and keeps spreadsheets clean and professional.
1. Why Expand Cells in Excel?
Expanding cells in Excel is essential for improving the readability, professionalism, and functionality of our spreadsheets. When text or numbers are cut off or hidden due to insufficient cell size, it can lead to confusion, errors, or an unpolished appearance.
- 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.
2. How 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.
Now, let's look at the steps to be followed:
2.1. Methods 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.
2.2. Methods 2: Using Warp 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.
Explore
Excel Fundamental
Excel Formatting
Excel Formula & Function
Excel Data Analysis & Visualization
Advanced Excel
Excel Data Visualization
Excel VBA & Macros
Power BI & Advance Features in Excel