+ Reply to Thread
Results 1 to 14 of 14

Delete all the extra blank rows at the bottom of spreadsheet

  1. #1
    Registered User
    Join Date
    06-19-2007
    Posts
    2

    Delete all the extra blank rows at the bottom of spreadsheet

    I have a worksheet that has 156 rows in it, someone has scrolled down the sheet an it seems that they have inserted 45,000 empty rows. This has made my spread sheet size large. I have tried to delete the rows at the bottom of the sheet, been onto google and found some macros to run. The macros run ok and delete any empty rows if they are in the first 156 rows but they dont seem to delete all the empty rows at the bottom of the sheet.

    I could cut and paste the worksheet but it is quite a complicated one with lots of formatting and formulas.

    There must be a simple solution, can anyone help?

  2. #2
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517

    Annoying isn't it

    Sorry I can't help, but I just wanted to add my own moan about this feature of EXCEL.

    It seems to keep a record of cells that have been "altered"
    and that seems to include cells that have been deleted.

    If a clean cell at the bottom of a new workbook is selected and deleted,
    that workbook now has that number of rows.

    What we want is some way of resetting the "altered" flag.

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Does this link work for you ??

    http://www.contextures.com/xlfaqApp.html#Unused

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Forum Contributor harrywaldron's Avatar
    Join Date
    05-24-2007
    Location
    Roanoke, VA
    MS-Off Ver
    Office Professional 2010 BETA
    Posts
    169
    Hi JC - I experimented some myself (e.g., trying the highlighting of cells and pasting or paste special - and it didn't copy the formulas across).

    However, I'm using Office 2003, which has the "Office Clipboard". When I copied the full range of desired cells and when I pasted using the "Office Clipboard", I also got the formulas to indeed carry over

    I'm not sure if this will help you, but I'll share and hopefully other members might have a better answer.

  5. #5
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    147
    1. left clik on row 157 (or the first empty row you want to delete after your data)
    2. hold shift+ctrl and then press down
    3. All rows (approx 64,000) should be highlighted
    4. Right click and delete all the rows
    5. Save your workbook


    This should work

  6. #6
    Forum Contributor harrywaldron's Avatar
    Join Date
    05-24-2007
    Location
    Roanoke, VA
    MS-Off Ver
    Office Professional 2010 BETA
    Posts
    169

    Thumbs up

    Thanks Shadestreet ... That is an awesome technique, that I just captured in own Tips document, I've started keeping in Word.

    I just put this to work on fancy Excel phone listing for our company. The size of the spreadsheet went from 888KB to 64 KB, for exactly the same reason our original poster shared ... Note that this works going across columns as well when you're on the last column of applicable cells, you can use your technique with the Right arrow to highlight and delete anything in that direction as well. This way you can clean up both vertically and horizonally any propogated cells that are out-of-range.
    Last edited by harrywaldron; 06-19-2007 at 02:50 PM.

  7. #7
    Registered User
    Join Date
    06-19-2007
    Posts
    2
    thanks to everyone who replied to me so far. Thanks Shadestreet that looks like a nice easy solution (and it worked for some), however i tried it and it didn't delete the rows (i've done what you said a number of times but couldn't get it to work) Could this because i'm using Excel from Office 2000??

  8. #8
    Forum Contributor harrywaldron's Avatar
    Join Date
    05-24-2007
    Location
    Roanoke, VA
    MS-Off Ver
    Office Professional 2010 BETA
    Posts
    169
    Hi JC - If Excel highlights the rows, you should be able to right mouse over on the ROW # itself and from the right mouse button select DELETE from the right mouse menu.

    If you can highlight all remaining rows, try also from the EXCEL main menu bar, >>> EDIT >>> DELETE ... As that worked in a quick test of the 888KB spreadsheet moving to 64KB

    Note also that the 65,000+ rows won't physically disappear from Excel, they'll simply be cleared out and when you save, you should recover space if there were hidden attributes or data propogated downwardly in them.
    Last edited by harrywaldron; 06-20-2007 at 10:36 AM.

  9. #9
    Registered User
    Join Date
    05-11-2015
    Location
    Joliet, Illinois
    MS-Off Ver
    2013
    Posts
    1

    re: Delete all the extra blank rows at the bottom of spreadsheet

    Does anyone have a solution for this that will work on a very low-powered machine? I work in a warehouse office that has us running off these tiny box computers (8"x8"x2").

    I made the mistake of copy-pasting a formula to an entire column instead of just the rows I need. My spreadsheet goes down to row 1,048,576 and I get an error reading that Excel cannot complete the command for the above fix with available resources.

    I tried deleting by column instead of row, put that ended up removing my data as well.

  10. #10
    Registered User
    Join Date
    10-09-2014
    Location
    midatlantic
    MS-Off Ver
    97
    Posts
    4

    re: Delete all the extra blank rows at the bottom of spreadsheet

    8 years later and this posting saved me! I wanted to print, and those 50k extra lines made a mess
    of the print preview (4000 printable pages...). Tried the fix, it worked and now the print preview
    is 6 pages.

    Thank you to everyone here!


    On using low use computers -- can you select 5000 at a time, and clear all in them? That would probably work.

  11. #11
    Registered User
    Join Date
    09-11-2015
    Location
    37094
    MS-Off Ver
    2013
    Posts
    2

    re: Delete all the extra blank rows at the bottom of spreadsheet

    I found a very quick method.... assuming your good rows don't have any duplications, highlight the entire spreadsheet and in DATA select Remove Duplicates. works a charm for me

  12. #12
    Registered User
    Join Date
    11-11-2015
    Location
    Indianapolis, IN
    MS-Off Ver
    2010
    Posts
    1

    re: Delete all the extra blank rows at the bottom of spreadsheet

    Please note that, in Excel 2010, "Save your workbook" is a vital step. The last row in the worksheet isn't change until the file is saved.

  13. #13
    Registered User
    Join Date
    06-01-2017
    Location
    Georgia, USA
    MS-Off Ver
    2013
    Posts
    1

    re: Delete all the extra blank rows at the bottom of spreadsheet

    I've found the easiest solution is just to create a new worksheet and copy just the data into a new worksheet. Delete the original worksheet.

  14. #14
    Registered User
    Join Date
    12-20-2022
    Location
    Yorkshire, England
    MS-Off Ver
    Microsoft 365
    Posts
    1

    Re: Delete all the extra blank rows at the bottom of spreadsheet

    First find out where Excel thinks the last currently-used cell is. To do this :-
    Press function key F5 - a "Go To" panel will be displayed.
    Select "Special...", then "Last cell", then "OK" - the "Go To" panel will disappear, and the "last used cell" will become highlighted.

    Highlight all the empty rows (don't forget to include the row number "cells") below your useful data up to and including the row containing the "last used cell" and delete them.

    IT IS IMPORTANT TO PERFORM THE NEXT STEP IMMEDIATELY BEFORE DOING ANYTHING ELSE!!
    Left-click anywhere in the useful data, then Save the spreadsheet, Close it, and Open it again.

    Repeat the first paragraph and you should see that Excel now thinks that the "last used cell" is the rightmost cell of the last useful row.

    You can delete unused columns to the right of useful data in a similar way.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Delete Blank Rows and then Paste Information After Bottom Row
    By sherylt13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2017, 06:15 PM
  2. [SOLVED] How do I delete blank rows at the bottom of my data
    By Interesting Ian in forum Excel General
    Replies: 7
    Last Post: 11-17-2014, 04:59 PM
  3. [SOLVED] Keeping blank rows at the bottom while sorting a 300 row spreadsheet
    By badiller in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-26-2013, 02:13 PM
  4. [SOLVED] Excel 2007 : Blank Rows At Bottom of Sheet Will Not Delete
    By KSSLR in forum Excel General
    Replies: 3
    Last Post: 06-20-2012, 01:15 PM
  5. delete extra rows at bottom
    By morgonzola in forum Excel General
    Replies: 4
    Last Post: 02-02-2007, 12:50 AM
  6. [SOLVED] How do I delete blank rows at the bottom of a spreadsheet to get .
    By Miklaurie in forum Excel General
    Replies: 1
    Last Post: 01-26-2005, 11:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1