Sometimes we need to fix cell size in Excel to make the dataset more attractive. By default, every Excel worksheet contains the same-sized cells. We modify them for our own needs. In this article, we are going to learn about how to fix cell size in Excel with some examples and explanations.
Practice Workbook
Download the following workbook and exercise.
11 Quick Ways to Fix Cell Size in Excel
1. Excel Format Feature to Set Cell Size Numerically
Assume we have a dataset (B4:C9) containing different students’ names with their maths marks. So, we are going to fix the size of Cell C5. Follow the steps below for that.
STEPS:
- First, select Cell C5.
- Next, go to the Home tab from the Ribbon.
- Select Format drop-down from the Cells group.
- Now click on the Row Height option.
- A Row Height message box appears. Input 25 in the blank.
- Press OK.
- We can see the cell’s row height is fixed like below.
- Then again, go to Home > Format > Column Width.
- We can see the Column Width message box. Write down 20 in the blank space.
- After that, click on OK.
- Finally, we can see the size of the cell is fixed numerically like below.
Read More: How to Reset Cell Size to Default in Excel (5 Easy Ways)
2. Manually Modify Excel Value Containing Cell Size into Default with Mouse
Let’s consider that we have the same dataset. We are going to modify manually the cell size that contains a value.
STEPS:
- In the beginning, select Cell C5.
- Now take the mouse cursor over the right edge of the heading of Column C. The cursor looks like a Double Arrow.
- Double click on it.
- Similarly, do the same procedure in Row 5. This time we take the mouse cursor over the bottom edge of Row 5 and double click on it when it turns into a Double Arrow.
- In the end, we can see that Cell C5 is fixed as required and looks like the below picture.
Read More: How to Change Cell Size without Changing Whole Column (2 Methods)
3. Automatically Fixing Cell Size Containing Value in Excel
Here, we have the same dataset. We want to fix automatically every cell size in a decent size that is adjustable to the contained value. Let’s see how to do that.
STEPS:
- Firstly, select the top left corner arrow (Select All button) to select all the cells of the worksheet (see screenshot)
- Secondly, put the mouse cursor at the column border.
- Double click on it.
- Thirdly, take the cursor to the row border and double click on it too.
- Finally, we can see the result below. Here, we change the font size to fit the text in the fixed cell.
Read More: How to Make Excel Cells Expand to Fit Text Automatically (5 Methods)
4. Autofit Excel Cell Size
Imagine we have the same dataset as Method 1. We want to autofit the size of Cell C4.
STEPS:
- First, select Cell C4.
- Now go to the Home tab.
- Then click on the Format drop-down of the Cells group.
- After that, select AutoFit Row Height from the list.
- Again go to the Home tab > Format drop-down > AutoFit Column Width option.
- In the end, we can see the autofitted cells.
Read More: How to Autofit in Excel (7 Easy Ways)
5. Set Cell Size by Dragging Cursor in Excel
Let’s assume, we want to set the cell size of Cell B5. We can do this simply by dragging the mouse cursor. Let’s demonstrate the process.
STEPS:
- Select Cell B5 at first.
- Secondly, move the cursor to the right side of the column header of Column B.
- When the cursor turns into Double Arrow, left-click on the mouse and drag it to the right or left side as much as we want. We can see the measurement of the column width there also.
- After that, release the mouse click.
- Finally, we can see the fixed-size cells. We can do this to fix the cell’s row size also.
Read More: How to Change Column Width in mm in Excel (A Step-by-Step Guideline)
6. Change Font Size to Fix Excel Cell Size
Sometimes we need to change the font size to fix the excel cell size. Here we are going to apply this method in Cell B5. Let’s see how to do that.
STEPS:
- In the beginning, select Cell B5B.
- Next, go to the Home tab.
- From the Font section, select the font size as 22. We can see that the font size of the cell has changed.
- Then put the cursor to the bottom edge of the row border of the selected cell.
- Now double click on the border.
- After that, we can follow the same process in the column border.
- Here we go! We can see the resized cell in the below screenshot.
Read More: How to Increase Cell Size in Excel (7 Methods)
7. Protect Worksheet to Secure Cell Size
Often we share our Excel workbook with others. So we can protect our worksheet to secure the cell size. Follow the below steps to know how to do that.
STEPS:
- Firstly, go to the Review tab.
- Secondly, select the Protect Sheet option from the Protect section.
- We can see a Protect Sheet window popping up.
- Thirdly, input a password in the ‘Password to unprotect sheet’ box.
- Now, check on all the boxes except two (See below screenshot).
- Then press OK.
- Here, a Confirm Password message box pops up.
- Reenter the password that we have given in the previous step.
- After that, click on OK.
- Finally, if we go to the Home tab > Format feature, we can see that all the Cell Size options are grayed out.
Read More: How to Make a Cell Bigger in Excel (Easiest 7 Ways)
8. VBA Code to Fix Cell Size in Excel
Excel VBA (Visual Basic for Applications) makes our work simpler. We can easily fix the cell size by using VBA. It also saves time. Let’s demonstrate the process.
STEPS:
- Right-click on the sheet VisualBasic from the sheet bar at first.
- Then select the View Code option.
- A Visual Basic Module window pops up. Copy the below code and paste it there.
Sub Fix_Cell()
Dim Wsheet As Worksheet
Set Wsheet = Worksheets("VisualBasic")
With Wsheet
.Cells.UseStandardHeight = True
.Cells.UseStandardWidth = True
End With
End Sub
- After that, click on the Run Sub option to run the code. We can use the F5 key to run it.
- Now select the sheet from the Macros window and click on the Run button.
- At last, we can see that all the cells are fixed to the default cell size.
- We can also resize the font to make it fit the cell.
Read More: How to Change Cell Size in Excel (5 Methods)
9. Excel VBA to Fix Size of Specific Cell
In the previous example, we used VBA also. But that will fix all the cells of the worksheet. Suppose, we want to fix only Cell B5 from the dataset. To do that, see the below steps.
STEPS:
- In the beginning, select cell B5.
- After that, right-click on sheet VBA from the sheet bar.
- Click on View Code.
- We can see a Visual Basic Module window. Write the below VBA code there. We can simply copy and paste the code.
Option Explicit
Sub Cell_Fix()
Selection.ColumnWidth = 25
Selection.RowHeight = 30
End Sub
- Next, press the F5 key from the keyboard to run the code. We can click on the Run Sub option also.
- Then select the sheet from the Macros window.
- Hit the Run button.
- That’s it. Finally, we see that the cell size is fixed as required.
10. Fix Cell Size with Keyboard Shortcuts
There are some keyboard shortcuts to fix cell size. They are discussed below:
- Press Alt + H, O, H to open the Adjust Row Height option.
- If we want to open the Autofit Row Height option then hit Alt +H, O, A keys.
- Alt +H, O, W keys are used to open the Adjust Column Width feature.
- We need to press Alt + H, O, I keys from the keyboard for opening the Autofit Column Width option.
11. Context Menu to Set Cell Size
Context Menu is an important feature in Excel. We can easily fix the cell size with this. Suppose, we want to fix the size of Cell B5. To know how to use the context menu, follow the below steps.
STEPS:
- First, select the entire column. Here we select Column B.
- Now, take the cursor to the selected column header and right-click on the mouse.
- A Context Menu pops up. Select the Column Width option from that.
- Next, we see a Column Width message box.
- Write down the required width of the cell (25) in Column width blank.
- Press OK.
- Then select the entire row. Here we select Row 5.
- Again right-click on the mouse.
- Select the Row Height option from the context menu.
- A Row Height message box appeared.
- After that, write down the required cell height (30) in the Row height blank.
- Finally, press OK.
- In the end, we can see the fixed Cell B5.
Read More: How to Adjust Column Width in Excel (7 Ways)
Conclusion
By using these methods, we can quickly fix cell size in Excel. There is a practice workbook added. Go ahead and give it a try. Feel free to ask anything or suggest any new methods.