Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In an Excel 2010 file, there are about 100 rows containing data, but the whole work sheet displays 1048576 blank rows (making the file about 2.5 mb). I need to delete blank rows after the data. But selecting the row and deleting it is doing nothing. How to delete these unwanted rows?

This is my excel file:

Can someone explain what is wrong with this file?

share|improve this question
Any version of Excel will display any of the available blank rows and allow you to enter data. If you want data on rows 1 and 1,000,000 that is your choice. But rows 2 to 999,999 do not take up space until you use them. Do you have images within the workbook? What happens if you copy the 100 rows to a blank file? – Tony Dallimore Jan 6 '12 at 9:29
@Tony Thanks for the answer, Finally I've managed to copy data (with some formatting) to new file. – Nalaka526 Jan 6 '12 at 10:01
@Tony If you're interested just check the file I've attached. Thanks – Nalaka526 Jan 6 '12 at 10:04
Happy that I could be of some help. I have copied your file to my computer. However, my ex-employer and most of my clients still use Excel 2003 so that is what I have on my main computer. I will try your file on a different computer tomorrow and get back if I discover anything. However, most Office products sometimes get themselves into a muddle and your option is to extract the data to a empty file. – Tony Dallimore Jan 6 '12 at 11:25
Applying a format to an entire column will cause this to happen. Don't do it: – Excellll Jan 6 '12 at 14:21
up vote 6 down vote accepted

There is definitely something wrong with your file. It might be easier to copy the 100 rows you want to keep to a new workbook file rather than try to delete a million rows.

A search for duplicates in the whole document found and removed over 1 million duplicates. So there are hidden characters or something occupying space in that workbook. That still didn't help because the save size after that went up to 35MB.

Solution: Once I copied the rows you have populated to a new workbook, the saved file size is only 10K.

share|improve this answer

Select the rows you want to delete. If you have Office 2003:

2007 and later: in the ribbon on start, there is the button delete (block called cells), click the small arrow under it and choose delete rows.

share|improve this answer
This did not fix the issue. :( – Nalaka526 Jan 6 '12 at 8:44
What is not working? Which version of Excel do you have? – Robert Jan 6 '12 at 9:01
In Excel 2013 I was able to do the above. Although I got some grammatically-incorrect error-message along the lines of "Operation cannot be completed with available resources, cancel or select less data" I was then prompted to either "Cancel" or "Continue without undo". Selecting the latter and then saving seemed to fix the problem of Excel thinking my working space was 1048579 rows tall. – SeldomNeedy Feb 13 at 6:35

Best option is to use ctrl+shift + downarrow to hide unwanted rows and ctrl+shift + right arrow to hide unwanteed columns

share|improve this answer

I had this same issue and found a way to fix that worked on a few occasions for me.

Make sure you don't have any formatting going down those columns (e.g., cell borders applied to an entire column). Grab the scroll bar and drag it all the way to the bottom. Select the bottom row (1048579, I believe) and a bunch above it, about 20-30, whatever is visible on the screen. Right-click the row header area and click Delete. Drag the scroll bar back to the top and select a cell where your data is. Select a different worksheet, then go back. It should be fixed.

share|improve this answer

Another cause can be that one or several columns of the worksheet are referenced in some formula in another worksheet without specifying the number of rows.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .