My Excel sheet seems to have 65555 rows - though we're only using the first few hundred. If I delete rows from the bottom it doesn't seem to change anything. How can I resize it back down to what we're using?
-
Hide the excess rows. – Scott Craner Jul 24 '18 at 14:26
-
1You can't, you can only hide them – PeterH Jul 24 '18 at 14:27
-
Excel supports maximum 1048576 rows, [at least since Excel 2007](https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3#ID0EBABAAA=Office_2007) – phuclv Jul 24 '18 at 15:37
3 Answers
As far as Excel is concerned the unused cells don't exist. It doesn't store them in memory and it doesn't save them in the spreadsheet file. So the number of rows could be infinite without causing Excel any problems. I'd guess the limit of 65536 was just a number sufficiently large that Microsoft thought no-one would ever need that many.
That's why your attempts to delete empty rows have no effect, because those rows don't exist anyway.
If you want to hide all the unused rows for cosmetic purposes the usual strategy is to turn off the gridlines so the unused cells just look blank white. Then you can manually format borders around the cells that you are using.
- 368
- 2
- 5
- 18
This sometimes happens when those cells have formatting but no data
When you save a workbook, Excel stores only the part of each worksheet that contains data or formatting. Empty cells may contain formatting that causes the last cell in a row or column to fall outside of the range of cells that contains data. This causes the file size of the workbook to be larger than necessary and may result in more printed pages when you print the worksheet or workbook.
Locate and reset the last cell on a worksheet
The most common cause of the last cell being set outside the worksheet range that is currently in use is excessive formatting. When you format whole rows and columns, some types of formatting can cause the last cell to be set to a cell far below or to the right of the actual range that is in use.
How to reset the last cell in Excel
If pressing Ctrl+End brings you far beyond your data range then try resetting the last cells. There are 2 ways to do that
Manually clear the formatting
- Select all columns to the right of the last column that contains data, or select all rows below the last row that contains data. A quick way to that is press F5 and type
F:IVto delete columns F to IV, or5:65536to delete rows 5 to 65536 - On the Home tab, in the Editing group, click the arrow next to the Clear button then click Clear All.
- Save the worksheet and close it
- Select all columns to the right of the last column that contains data, or select all rows below the last row that contains data. A quick way to that is press F5 and type
Use VBA
- Press Alt+F11 to open VBA
Select Insert > Module, then paste below snippet
Sub ResetLastCell() ActiveSheet.UsedRange End SubPress F5 or click Run
For more information
- 26,555
- 15
- 113
- 235
Actually you can't, but select all rows you want to delete then hide them in view tab and save file. Now you won't see them anymore.
- 1
- 1
-
1Considering others have already answered the question with more information. Hiding isn't the same as deleting them. – music2myear Aug 22 '22 at 03:55