Learn How to Limit Rows and Columns in an Excel Worksheet (2024)

> MS Office

Display only what you want to see

By

Ted French

Ted French

Writer

    Former Lifewire writer Ted French is a Microsoft Certified Professional who teaches and writes about spreadsheets and spreadsheet programs.

    lifewire's editorial guidelines

    Updated on September 26, 2022

    Reviewed by

    Christine Baker

    Reviewed byChristine Baker

      Christine Baker is a marketing consultant with experience working for a variety of clients. Her expertise includes social media, web development, and graphic design.

      lifewire's editorial guidelines

      Trending Videos

      What to Know

      • To hide certain rows: Select or highlight the rows you want to hide. Right-click a row heading and choose Hide. Repeat for columns.
      • To unhide: Right-click the header for the last visible row or column and choose Unhide.
      • To temporarily limit range of cells: Right-click sheet tab > View Code > Properties. For ScrollArea, type A1:Z30. Save, close, and reopen Excel.

      To help control the size of an Excel worksheet, you can limit the number of columns and rows that a worksheet displays. In this guide, we show you how to hide (and unhide) rows and columns in Excel 2019, Excel 2016, Excel 2013, and Excel for Microsoft 365, as well as how to limit access to rows and columns using Microsoft Visual Basic for Applications (VBA).

      Hide Rows and Columns in Excel

      An alternative method for restricting the work area of a worksheet is to hide sections of unused rows and columns; they'll stay hidden even after you close the document.Follow the steps below to hide the rows and columns outside the range A1:Z30.

      1. Open your workbook and select the worksheet you want to hide rows and columns in. Click theheader for row 31 to select the entire row.

        Learn How to Limit Rows and Columns in an Excel Worksheet (1)

      2. Press and holdtheShiftandCtrlkeys on the keyboard. At the same time, press thedown arrowkey on the keyboard to select all rows from row 31 to the bottom of the worksheet. Release all the keys.

        Learn How to Limit Rows and Columns in an Excel Worksheet (2)

      3. Right-click one of therow headingsto open the contextual menu. Select Hide.

        Learn How to Limit Rows and Columns in an Excel Worksheet (3)

      4. The worksheet now shows only the data in rows 1 through 30.

        Learn How to Limit Rows and Columns in an Excel Worksheet (4)

      5. Click the header for columnAAand repeat steps 2 and 3 (using the right arrow key instead of the down arrow key) to hide all columns after column Z.

        Learn How to Limit Rows and Columns in an Excel Worksheet (5)

      6. Save the workbook; the columns and rows outside the range A1 to Z30 will remain hidden until you unhide them.

        You can use the same process to hide any rows or columns you want. Just select the header or headers for the row or column, right-click the header, and select Hide.

      Unhide Rows and Columns in Excel

      When you want to view the data you hid, you can unhide the rows and columns at any time. Follow these steps to unhide the rows and columns you hid in the previous example.

      1. Open the worksheet you used to hide row 31 and higher and column AA and higher. Click the headers for row 30 (orthe last visible row in the worksheet) and the row below it. Right-click the row headers and, from the menu, select Unhide.

        Learn How to Limit Rows and Columns in an Excel Worksheet (6)

      2. The hidden rows are restored.

        Learn How to Limit Rows and Columns in an Excel Worksheet (7)

      3. Now click the headers for column Z (or the last visible column) and the column to the right of it. Right-click the selected column headers and, from the menu, choose Unhide. The hidden columns are restored.

        Learn How to Limit Rows and Columns in an Excel Worksheet (8)

      Limit Access to Rows and Columns With VBA

      You can use Microsoft Visual Basic for Applications(VBA) to temporarily limit the range of usable rows and columns in a worksheet. In this example, you'll change the properties of a worksheet to limit the number of available rows to 30 and the number of columns to 26.

      Changing thescroll area is a temporary measure; itresets each time the workbook is closed and reopened.

      1. Open a blank Excel file. At the bottom of the screen, right-click the Sheet1 sheet tab. From the menu, choose View Code.

        Learn How to Limit Rows and Columns in an Excel Worksheet (9)

      2. TheVisual Basic for Applications(VBA) editor window opens. In the left rail, locate thePropertiessection.

        Learn How to Limit Rows and Columns in an Excel Worksheet (10)

      3. Under Properties,in the right column of the ScrollArearow, click the empty box and type A1:Z30.

        Learn How to Limit Rows and Columns in an Excel Worksheet (11)

      4. Select File > Save and save your workbook as you normally would. Select File > Close and Return to Microsoft Excel.

        Learn How to Limit Rows and Columns in an Excel Worksheet (12)

      5. To make sure your change is applied, perform this test. In your worksheet, try to scroll past row 30 or column Z. If the change has been applied, Excel bounces you back to the selected range and you're unable to edit cells outside that range.

        Learn How to Limit Rows and Columns in an Excel Worksheet (13)

      6. To remove the restrictions, access VBA again and delete the ScrollArea range.

      FAQ

      • What is the maximum limit of rows in Excel?

        Microsoft says that the maximum size of a single Excel spreadsheet is 1,048,576 rows by 16,384 columns. The maximum row height is 409 points, and the maximum column width is 255 characters.

      • How do I permanently set row and column limits in Excel?

        If you want to set a hard limit to columns or rows in an Excel spreadsheet (i.e. set it up so no additional rows or columns can be added past that set limit), unfortunately you can't. There's currently no menu option to prevent yourself or other users from adding more rows or columns you may not want. However, you can manually delete unwanted rows and columns by right-clicking the selected row(s) or column(s) and selecting Delete.

      Was this page helpful?

      Thanks for letting us know!

      Get the Latest Tech News Delivered Every Day

      Subscribe

      Tell us why!

      Learn How to Limit Rows and Columns in an Excel Worksheet (2024)

      FAQs

      How to limit rows and columns in an Excel worksheet? ›

      Right-click one of the row headings to open the contextual menu. Select Hide. The worksheet now shows only the data in rows 1 through 30. Click the header for column AA and repeat steps 2 and 3 (using the right arrow key instead of the down arrow key) to hide all columns after column Z.

      How do I limit answers in Excel? ›

      Restrict data entry
      1. Select the cells where you want to restrict data entry.
      2. On the Data tab, select Data Validation > Data Validation. ...
      3. In the Allow box, select the type of data you want to allow, and fill in the limiting criteria and values.

      How do I stop infinite rows and columns in Excel? ›

      With the columns selected, right-click on any of the selected column headers. From the context menu, choose “Delete.” Excel will remove all the selected columns, including the infinite ones.

      How many rows and columns are in an Excel worksheet? ›

      The term Worksheet used in Excel documents is a collection of cells organized in rows and columns. It is the working surface you interact with to enter data. Each worksheet contains 1048576 rows and 16384 columns and serves as a giant table that allows you to organize information.

      What is the maximum number of rows in an Excel worksheet? ›

      1,048,576 rows

      How do I limit an Excel cell to a list? ›

      Select the cell in the worksheet where you want the drop-down list. Go to the Data tab on the Ribbon, then select Data Validation. On the Settings tab, in the Allow box, select List. If it's OK for people to leave the cell empty, check the Ignore blank box.

      What is the formula for setting a limit in Excel? ›

      How do you set a maximum limit in Excel? To handle this task, you only need to apply the Max or Min function in Excel. Select a cell which you will place the formula at, type this formula =MIN(100,(SUM(A5:A10))), A5:A10 is the cell range you will sum up, and press Enter.

      How do I restrict some columns in Excel? ›

      Right click and choose Format cells. Go to the Protection tab and uncheck Locked option and click Ok. Now select only the cells or columns, rows that you want to protect. Right click and choose Format cells again.

      How do I stop rows and columns in Excel? ›

      Freeze columns and rows

      Select View > Freeze Panes > Freeze Panes.

      How do I keep only certain rows and columns in Excel? ›

      How to Limit View to Specific Row of Columns A-C
      1. Click the column heading for Column L.
      2. Press Shift+Command+➡︎ [to select all columns to the right]
      3. Use the keyboard shortcut Control+0 [zero] or right-click any selected column & choose the Hide command.
      Sep 11, 2019

      How to choose the number of rows and columns in Excel? ›

      Select one or more rows and columns
      1. Select the letter at the top to select the entire column. Or click on any cell in the column and then press Ctrl + Space.
      2. Select the row number to select the entire row. ...
      3. To select non-adjacent rows or columns, hold Ctrl and select the row or column numbers.

      How to increase Excel row limit? ›

      No, you can not increase the Excel row limit. However, you can create a new worksheet in Excel to add more rows.

      How many columns can Excel handle? ›

      Desktop Excel has a row limit of 1,048,576 rows and a column limit of 16,384 columns.

      How do I restrict the number of rows in Excel? ›

      Another simple way of restricting the rows in excel is by protecting the sheet and disabling the feature of allowing the user to select locked cells in excel. This way, we can restrict the user from accessing the restricted rows. In this method, the user is only restricted from accessing the rows.

      How to make an Excel sheet not have so many rows? ›

      Couple ways you can try to fix this, select all the columns and/or rows outside of the area your data exists, then right-click and delete rows/columns. If it's just static data that dosn't reach across tabs, it may be easier to just highlight the data, copy and paste to a new tab.

      Top Articles
      How to Conduct a 10-Minute Interview
      3 Ways to Study for Five Minutes Before a Test - wikiHow
      St Thomas Usvi Craigslist
      Dragon Age Inquisition War Table Operations and Missions Guide
      Mcgeorge Academic Calendar
      Craglist Oc
      Klustron 9
      Gameplay Clarkston
      Weather In Moon Township 10 Days
      Shariraye Update
      Https //Advanceautoparts.4Myrebate.com
      Identogo Brunswick Ga
      Labor Gigs On Craigslist
      Directions To 401 East Chestnut Street Louisville Kentucky
      Gem City Surgeons Miami Valley South
      Tvtv.us Duluth Mn
      Everything We Know About Gladiator 2
      St Maries Idaho Craigslist
      Ukc Message Board
      Aris Rachevsky Harvard
      Kountry Pumpkin 29
      Dover Nh Power Outage
      The Blind Showtimes Near Amc Merchants Crossing 16
      Dr Ayad Alsaadi
      Maxpreps Field Hockey
      Sullivan County Image Mate
      The Old Way Showtimes Near Regency Theatres Granada Hills
      Wemod Vampire Survivors
      Teekay Vop
      Workshops - Canadian Dam Association (CDA-ACB)
      fft - Fast Fourier transform
      Labcorp.leavepro.com
      When His Eyes Opened Chapter 3123
      Doctors of Optometry - Westchester Mall | Trusted Eye Doctors in White Plains, NY
      Shelby Star Jail Log
      3 Ways to Drive Employee Engagement with Recognition Programs | UKG
      Kamzz Llc
      Shauna's Art Studio Laurel Mississippi
      Mark Ronchetti Daughters
      Wega Kit Filtros Fiat Cronos Argo 1.8 E-torq + Aceite 5w30 5l
      Nacogdoches, Texas: Step Back in Time in Texas' Oldest Town
      Southern Democrat vs. MAGA Republican: Why NC governor race is a defining contest for 2024
      2015 Chevrolet Silverado 1500 for sale - Houston, TX - craigslist
      Hattie Bartons Brownie Recipe
      Save on Games, Flamingo, Toys Games & Novelties
      Ksu Sturgis Library
      Free Crossword Puzzles | BestCrosswords.com
      Plumfund Reviews
      Verizon Forum Gac Family
      18 Seriously Good Camping Meals (healthy, easy, minimal prep! )
      Hy-Vee, Inc. hiring Market Grille Express Assistant Department Manager in New Hope, MN | LinkedIn
      Latest Posts
      Article information

      Author: Prof. Nancy Dach

      Last Updated:

      Views: 5836

      Rating: 4.7 / 5 (57 voted)

      Reviews: 88% of readers found this page helpful

      Author information

      Name: Prof. Nancy Dach

      Birthday: 1993-08-23

      Address: 569 Waelchi Ports, South Blainebury, LA 11589

      Phone: +9958996486049

      Job: Sales Manager

      Hobby: Web surfing, Scuba diving, Mountaineering, Writing, Sailing, Dance, Blacksmithing

      Introduction: My name is Prof. Nancy Dach, I am a lively, joyous, courageous, lovely, tender, charming, open person who loves writing and wants to share my knowledge and understanding with you.