Method 1 – Keyboard Shortcuts to Auto Fit Row Height and Text Wrap in Excel
The sample dataset contains a list of top ten books by American authors. The full details of column C and D are hidden because the width and height of the cells are not sized correctly relative to the amount of material contained within.
- To Wrap Text using a Keyboard shortcut, select the entire range of data and press ALT+H+W as below. This applies text wrapping to the dataset.
- To change the row height, hold the Alt key and press H, O, and A. The row height has now been adjusted.
- Press ALT+H+O+I to auto-fit the column widths.
Method 2 – Auto Fit Row Height of Wrap Text with Mouse-Click
- Press CTRL+A+A to select the entire worksheet.
- Position the mouse on the line separating the row numbers as shown below so that the cursor changes to a two-sided arrow and double-click on it.
- This will adjust the row heights automatically.
- You can then double-click on the line separating the columns to adjust the column widths as shown below.
Method 3 – Use Cell Formatting to Auto Fit Row Height in Wrap Text
- Select the cells containing the text to be wrapped.
- Go to the Home tab on the ribbon and select Format, and select AutoFit Row Height or AutoFit Column Width from the dropdown menu.
Read More: How to Wrap Text in Excel Cell
Method 4 – Add Magic Buttons from the Quick Access Toolbar to Auto Fit Row Height of Wrap Text
If you need to repeat this process frequently, then you may find it beneficial to add a magic button in the Quick Access Toolbar.
- Press ALT+F+T to open Excel Options and select the Quick Access Toolbar tab.
- Choose All Commands from the dropdown menu.
- Scroll down to find the AutoFit Row Height and AutoFit Column Width commands.
- Select the commands and click the Add button.
- Once both are selected and in the quick access toolbar selection column on the right, hit the OK button.
- A magic button has been added in the top left corner of the Excel window as a Quick Access Tool. You can use this button to auto-fit the row height of wrap texts in just one click.
Things to Remember
- AutoFit Row Height and AutoFit Column Width do not work with merged cells. You need to manually adjust the row height or column width in those instances.
- If you apply autofit row height in a range of cells beforehand then the row height will adjust automatically whenever wrap text is applied in those cells.
Download Practice Workbook
Related Articles
- How to Wrap Text in Merged Cells in Excel
- How to Wrap Text across Multiple Cells without Merging in Excel
- How to Write a Paragraph in Excel Cell
- [Solution:] Excel Wrap Text Not Working for Merged Cell
- Excel VBA to Wrap Text
- VBA to Wrap Text for Entire Sheet in Excel
<< Go Back to Wrap Text | Text Formatting | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!
Pressing the suggested shortcut (ALT+H+W) on Windows resulted in crushing my Excel and losing a document I spent the entire day working on… Unless the shortcuts work for all systems, you shouldn’t suggest them… Any thoughts (besides a basic look-up of recent files) on how I could restore this file? It currently opens a file with a blank screen.
Hi Anya,
We regret to hear that. But you may have used the wrong shortcut. If you press ALT+W+H instead of ALT+H+W, then it will hide the window. Press ALT+W+U, then select the workbook in the popup window and click OK to unhide the window. Alternatively, you can click on Unhide from the Window group in the View tab.
I suggest you to make sure you are using the right shortcut before using any from next on. How can you do that? Well, if you press the Alt key, then you should see letters beside each tab on the Ribbon as the shortcut to go to that tab. Now press the letter visible beside the tab that you need to go. After that, you should see the shortcut letters visible beside each command on that tab. This way you will know if this is the right shortcut for the task.
Hope this solves your problem. If not then please let us know with details. We will try our best to help you fix that.
Regards
Md. Shamim Reza (ExcelDemy Team)