Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Hiding a Huge Number of Rows.
Written by Allen Wyatt (last updated April 23, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
Julia would like to hide all the rows in a worksheet except rows 1-30. She is looking for the fastest, easiest way to do this.
If you don't have to do the hiding too often, the easiest method is the following, provided there is something in every cell of column A:
If you don't have data in all the cells of column A, then the following variation is probably the fastest method:
Here's another quick method that can be used:
If you need to hide rows like this quite often, you could use the macro recorder to record any of the above techniques, or you could use a more flexible macro, like this one:
Sub HideRows() Dim r As Variant On Error GoTo Canceled r = InputBox("Rows to Hide:") Rows(r).EntireRow.Hidden = True Canceled: End Sub
The only caveat is that you need to remember to include a colon in the rows you specify for the macro. Thus, if you wanted to hide rows 31 through 543, you would enter 31:543.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12125) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Hiding a Huge Number of Rows.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
Want to set the width and height of a row and column by specifying a number of inches? It's not quite as straightforward ...
Discover MoreNeed to check the height of all the rows in a worksheet and then adjust them if a particular criterion is met? This tip ...
Discover MoreExcel automatically formats subtotals for you. But what if you want to change the default to something more suitable for ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments