Home >Common Problem >How to automatically adjust rows and columns based on data size in Excel
When you are rushing to submit your work, you find that your Excel worksheet is cluttered. Since rows and columns have different heights and widths, most of the data will overlap, making it difficult to display the data perfectly. Manually adjusting the height and width of rows and columns takes a lot of time, so this method is not recommended. Why bother doing something manually when you can automate it with a simple click or keystroke?
#In this article, we explain in detail how you can easily auto-adjust row height or column width in Excel worksheet by following 3 different solutions. From now on, you can choose your favorite solution and become an expert in Excel tasks!
Step 1: Open the worksheet you want to format. Click the Select All button located at the intersection of the row and column labels.
After selecting the entire worksheet, click the HOME tab at the top. Under the HOME option, click the drop-down menu named Format. From the format options, click AutoFit Row Height.
Step 2: If you look at the Excel worksheet now, you can see that the row heights have been automatically formatted to fit the content inside.
Now, let's go ahead and do the same thing with the columns. To do this, select the entire Excel worksheet again by clicking the Select All button at the intersection of the row and column labels.
Make sure you are on the Home tab and click the Format drop-down menu to select AutoFit Column Width from the list of available options " option.
Step 3: If you look at the Excel worksheet now, you can see that the AutoFit formatting is applied to the rows and columns . enjoy!
This method uses the same steps as the previous solution. However, you can use keyboard shortcuts instead of using mouse clicks.
Step 1: First, select the entire worksheet you want to format. You can click the Select All button at the beginning of the Excel worksheet, as shown in the screenshot below, or you can simply press the CTRL A keys simultaneously to select the entire worksheet .
With the worksheet selected, press the ALT H keys simultaneously to see the available shortcut options.
Now you will see a lot of letters on your Excel worksheet. These are shortcut options. For each function, a shortcut is assigned. Since we need to see the Format option, we need to press the Shortcut keyO assigned to it. So, On your keyboard, press the letters O.
Step 2: You can now see the Format drop-down menu in front of you. Similarly, you will see a number of letters in each of the available options in the "Format " option.
From this menu, to automatically adjust the row height, we need to select the AutoFit Row Height option. So, on your keyboard, press the shortcut key is assigned to it, which is A.
Step 3: That’s it. AutoFit formatting will now be applied to your rows.
Next, let’s apply AutoFit formatting to your columns. To do this, select the worksheet again by pressing the CTRL A keys simultaneously or by pressing the Select All button at the top.
Now, press the ALT H keys simultaneously to see the available shortcuts.
Press the O key to expand the Format drop-down menu.
Step 4: Finally, press the I key to automatically adjust the column height.
That’s all. Your columns should now be formatted as well.
It is recommended to always follow one of the two solutions listed in situations where you need to automatically adjust multiple columns or rows or both. operate. If you only need to automatically adjust a few rows or columns, following the methods listed in this section will get you there faster.
Step 1: To auto-adjust a column, double-click the title border of the column you want to auto-adjust. This will do the job instantly.
Step 2: Similarly, if you want to automatically adjust the row, you can double-click the row header border to automatically adjust the row height. Yes, it works perfectly if there are only a few rows or columns in the picture, not when you have to format the entire worksheet.
The above is the detailed content of How to automatically adjust rows and columns based on data size in Excel. For more information, please follow other related articles on the PHP Chinese website!