Open In App

How to Expand Cells to Fit the Text Automatically in Excel?

Last Updated: 04 Jan, 2023

P

Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

We all know how useful Excel is to store tabular data. We can do calculations in excel, we can store any information that is in the form of tables, and so on. But there are some common problems that we all face while using Excel. One of the problems that we encounter while entering oversized, overlength data in a cell. Whenever we enter any data that is not fitted in the cell every time we need to resize the column width and that is too frustrating. This article will show you how to make your cells automatically change their width whenever any oversized data is entered.

Steps to make Rows/Columns Fit Text Automatically in Excel

Initially, we have a table with column names “Name” and “Address”.

Fields-required

 

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

Data-entered

 

Now, let’s look at the steps to be followed:

Step 1: Right-click on the sheet name in the bottom-left corner.

Right-clicking-the-sheet

 

Step 2: Now select “View Code”.

Clicking-view-code

 

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

Selecting-worksheet

 

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

Console -window-opens

 

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

Cells.EntireColumn.AutoFit

Entering-code

 

Now close the window from the file menu.

Closing-window

 

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

Press-enter

 

Below video will help you to better understand these steps:

Note: To make this feature available permanently for this sheet simply save the file once. So, later, whenever you open the sheet you will still have this feature.



P

News
Improve
Discuss
Do you want to advertise with us?Click here to know more

How to Wrap Text in Excel Automatically and Manually - 3 Easy Methods

article_img
How to Wrap Around Text in Excel - Quick StepsSelect the cell(s).Go to Home >> Click Wrap Text.Adjust the row height if needed.Wrapping text in Excel is a simple yet essential feature that ensures your data is displayed clearly and fits neatly within each cell. When working with long entries, such as names, addresses, or descriptions, text may overflow into adjacent cells or become hidden. This guide will show you how to wrap text in Excel, making your data more readable and organized. Whether you're managing reports, creating tables, or formatting large datasets, wrapping text improves presentation and helps maintain a professional look.How to Wrap Text in ExcelTable of ContentWhat Is Text Wrapping in Excel?How to Wrap Text in Excel Automatically (Windows & Mac)Method 1: Wrap Text Using the Ribbon (Wrap Text Button)Method 2: Wrap Text Using Format CellsMethod 3: Using the Keyboard ShortcutHow to Wrap Text in Excel Manually with Line BreaksHow to Unwrap Text in Excel using Right ClickTroubleshooting Common Text Wrapping IssuesWhat Is Text Wrapping in ExcelText wrapping in Excel adjusts the way text is displayed in a cell. Instead of text overflowing into adjacent cells or
Read More

How to Fit Long Text in Excel Spreadsheets?

article_img
By default, when you create a new workbook in Excel, the row height and column width for all cells are set to the same value. If the text you enter in a spreadsheet cell is too long and the next column has data, it either spills over into the next blank cell or is truncated by the data in the adjacent cells. Although you can widen the columns, there is a better way to present your data in an easily readable fashion if you have a lot of them. There are many methods to fit the long text. So, in this article, we will discuss these methods one by one in detail. Increase the width of the columnIncreasing the column width will give you more text space, but it will also make every cell in the column wider. The column width is set to 8.43 standard font characters by default, however, it can be increased to 250. So to do this follow the given steps: Step 1: Fill in the column with long text. Step 2: Now place the mouse cursor on the vertical line to the right of the first letter in the top column. If you typed something in cell A4, for example, point to the vertical line between column letters "A" and "B" The cursor will change to a "+" symbol with arrows on both sides. Step 3: When you dou
Read More

How to Create Automatically Extended Plot Ranges in Excel?

article_img
We can easily create charts with the help of data points and data sources. But, If we have more data points added to our data source we need our chart will get updated depending upon our data source. For example, if we want to plot a sales chart on monthly basis, we need to update our chart every time we will need to add a new month's data. To overcome this problem, we will use automatically extending plot range. The dynamic extended plot range is a range that updates automatically when we add more data to it. And, Excel will update the chart depending on new data points added or deleted to the range dataset. Steps to Create Automatically Extended Plot Ranges in Excel In this example, we will be using random monthly sales data and will create a dynamically extending plot range for that dataset. Below are the steps to Create Automatically Extended Plot Ranges in Excel, Step 1: Create a Dataset. In this step, we will create our dataset. Here, we will use the following data as our dataset. Step 2: Create a Table. In this step, we will convert our dataset into a table. For this Select Data > Insert > Table. Once, we click on Table, Excel will pop up a window about Create Tab
Read More

How to Automatically Insert Date and Timestamp in Excel?

article_img
The Date and Timestamp is a type of data type that determines the date and time of a particular region. It contains some characters along with some encoded data. This format may vary from language to language. Keeping track of date and time helps in managing records of our work as well as segregate the information day-wise. In this article, we will be going to learn how we can automatically insert Date and Timestamp in Excel. There are multiple ways to insert Date and Timestamp in Excel. These methods include both static and dynamic methods. 1. Inserting Date And Timestamp using keyboard shortcuts (Static method) The static method is helpful when there are only a few cells where you need to insert the Date and Timestamp. You can quickly use the keyboard shortcut to manually insert the Date and Timestamp. Follow the below steps to implement the same: Select the cell into which the current date or time needs to be inserted.Use this shortcut - Ctrl + ; (Control + semicolon) to insert the current date.Use this shortcut - Ctrl + Shift + ; (Control + Shift + semicolon) to insert the current time.Use this shortcut - Press the combination (Ctrl + ;) and (Ctrl + Shift + ;) to insert the cur
Read More

Apple Will Soon Let Developers To Automatically Charge Users For Subscription

Synopsis: However in the new rule, Apple is taking away all the chance from the customers and is forcing them to use the application on the prices they provide, thus taking away all the choices of canceling the subscription. For a long time, Apple has become a subject of litigation and debate and now it is again on the verge of facing another issue. The company is going to test a new technology, which will be allowing the developers to automatically charge high fees for all the users in order for doing the in-app purchase (IAP) subscription. Currently, Apple has already clarified to their users that they will have to pay higher charges for all the subscriptions they want to opt for. Also, while subscribing to any application if the user does not click on "Agree to New Price" a pop which comes while downloading any app, they will not be able to avail of the same and the subscription gets canceled. However, in the new rule, Apple is taking away all the chance from the customers and is forcing them to use the application at the prices they provide, thus taking away all the choices of canceling the subscription. Now also, Apple for its subscription pricing changes is testing an opt-o
Read More

How To Stop Google Docs From Automatically Creating Number Lists

article_img
How to Disable the Automatic List Detection in Google Docs - Quick StepsStep 1: Open a Google DocStep 2: Navigate to the top menu and click on "Tools."Step 3: Choose "Preferences."Step 4: Select the checkbox beside "Automatically detect lists."Step 5: Click "OK" to confirm the changes.Google Docs is a free online document editor provided by Google. Google Docs makes it easier to create a document for personal and professional use with various features. Google Docs has a feature that helps users type quickly without spending more time on formatting the document with lists that is Auto Numbering. If your document has auto numbering enabled and you want to get rid of these then you are at the right place. Here, we will tell you how you can turn off automatically creating numbered lists in Google Docs. What is Auto Numbering Lists in Google Docs?Auto numbering of lists starts when we type the number 1 followed by a full stop and press Enter on the keyboard. Immediately the indentation is added to the content with auto numbering on every next line. Let us see how auto-numbering lists work in Google Docs below: Auto numbering lists in Google Docs automatically add numbers and indentation
Read More

I

Gemini Can Now Automatically Start Google Maps Navigation

article_img
Getting lost while following phone directions is a thing of the past! Google's AI assistant, Gemini, has received a significant upgrade that simplifies navigation. Previously, asking Gemini for directions would display the route but require an additional tap to launch navigation in Google Maps. Thankfully, those days are gone. Gemini can now automatically start navigation with Google Maps, making getting around a breeze. In short: Goodbye extra taps: No more needing to confirm navigation after asking Gemini for directions.Seamless experience: Gemini integrates with Google Maps for a hands-free navigation experience.Enhanced AI Assistant: This update highlights Gemini's growing capabilities as a Google Assistant alternative. What is Gemini?Gemini is an innovative AI assistant developed by Google. It utilizes cutting-edge artificial intelligence to understand your requests and complete tasks. Similar to Google Assistant, Gemini can answer your questions, control smart home devices, and even generate different creative text formats. This update further strengthens Gemini's capabilities, making it a viable alternative for users seeking a hands-free navigation experience. How to Activat
Read More

How to Run a Macro Automatically

article_img
To run a macro automatically when the workbook opens one must enable the developer's tools in Microsoft Excel. What is a Macro in Excel Macros allows automating repetitive tasks in Microsoft Excel. Some tasks need to be performed multiple times and repetition of all the actions would consume time. In such type of Scenarios, Macros helps in automating these tasks. How to Enable the Developer's ToolStep 1: Go to File > Options > Customize Ribbon Step 2: Then checkmark the Developer's tool option in the customize ribbon option. Now you can record Macro, run Macro and do everything that a developer can do. How to Run Macro Automatically when the workbook opensStep 1: Go to the developer's menu and then go to the visual basic Step 2: Go to ThisWorkbook Tab Step 3: Write down Private Sub Workbook_open() and hit enter. You will then see the below screen. You can write your code or basically whatever you want between this and it will automatically run every time the workbook is opened. Let us make a Welcome Message Box: Step 4: Save the workbook as Excel Macro-Enabled Workbook. Note: If you don't save it as an Excel macro-enabled workbook then it will not save the macros and it will
Read More

How to Find the Percentage of Two Cells in Microsoft Excel?

article_img
If you want to find the percentage of two cells in Microsoft Excel, Simply select an empty cell, where you want to display the percentage of the two cells. Type in the following formula in the selected cell : =address of cell1/address of cell2 For example, I want to print out the percentage of C2 and C3, so the formulae will be: =C2/C3, in an empty cell C4. As soon as you click on the return key, You will get your percentage calculated in cell C4. However, if a decimal value is displayed in the cell. Like 0.10, Simply press the shortcut key Ctrl+Shift+% to format as a percent or convert the numeric value into the percentage style and press the Return key. The Decimal value will be converted to a percentage. BeforeAfter You can also go to the Number section under the Home tab and press the % Symbol to convert to percentage format. % symbol under the Number listbox
Read More

How to Sum Diagonal Cells in a range in Excel?

article_img
The calculation of matrices is one of the most difficult numerical computation tasks. You may need to add values diagonally in a table when performing mathematical computations. Excel allows you to sum diagonal numbers without having to add the values one by one. We'll go through how to sum cells diagonally down or diagonally up. Example: The image below shows a matrix & we want to add the elements of the diagonal. Diagonal1 is the right diagonal & Diagonal2 is the left diagonal as its top element is on the left. Conditional Formatting (On Matrix or Table) : To do conditional formatting use the following steps :Step 1: Select the Matrix/Table. Then Go to the home tab & select the conditional formatting option. Step 2: Choose New Rule. Step 3: Select: "Use a formula to determine which cells to format" & in the rule description give the format values for the formula. Here we give 1st cell name of the matrix in the formula, i.e., column(B2) - row(B2) (For diagonal) Step 4: Click on the format. Choose the color, fonts, etc, for formatting & then click on OK. Step 6: Click on Ok. You will get your cells formatted. How to Sum Diagonal Cells in a range in Excel? A ran
Read More
three90RightbarBannerImg