Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Hiding a Huge Number of Rows.

Hiding a Huge Number of Rows

Written by Allen Wyatt (last updated January 4, 2020)
This tip applies to Excel 97, 2000, 2002, and 2003


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:

  1. Select cell A31.
  2. Press Shift+Ctrl+Down Arrow. All the cells from A31 through the last used cell in column A are selected.
  3. Press Shift+Ctrl+Down Arrow again. The selection is extended through the very last cell in column A.
  4. Hide your rows as you normally would. (Either right-click and hide that way or use the menus)

If you don't have data in all the cells of column A, then the following variation is probably the fastest method:

  1. Select cell A31.
  2. Press Shift+Ctrl+End. All the cells from A31 through the last used cell in the data table selected.
  3. Press Shift+Ctrl+Down Arrow. The selection is extended through the very last row in the worksheet.
  4. Hide your rows as you normally would. (Either right-click and hide that way or use the menus. You can also just press Ctrl+9.)

Here's another quick method that can be used:

  1. In the Name Box (top-left corner of the worksheet, above column A), enter A31:A65536. Excel selects the range you entered.
  2. Hide your rows as you normally would. (Either right-click and hide that way or use the menus/ribbon. You can also just press Ctrl+9.)

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 the following:

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:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (5731) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Hiding a Huge Number of Rows.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

AutoFitting Tables

Need to adjust the width of a bunch of table columns according to what is in the columns? Word provides a tool to do ...

Discover More

Calculating an IRR with Varying Interest Rates

You might wonder how you can calculate an IRR (internal rate of return) when the person repaying the loan pays different ...

Discover More

Disabling a Function Key

Function keys are used to perform common tasks in Excel. If you want to disable one of the function keys, it's rather ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (menu)

Tasks for Each Workbook

Excel allows you to control how it uses the Windows Taskbar. This tip explains the two ways Excel can use the Taskbar and ...

Discover More

Fixing "Can't Find Files" Errors

If you get errors about unfindable files when you first start Excel, it can be frustrating. Here's how to track down and ...

Discover More

Changing Excel's Starting Date

When keeping track of dates, internally, Excel uses special date serial numbers that are based upon a specific day in the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.