+ Reply to Thread
Results 1 to 14 of 14

Deleting empty rows does not work

  1. #1
    Registered User
    Join Date
    01-23-2023
    Location
    Amsterdam
    MS-Off Ver
    Office 365
    Posts
    22

    Deleting empty rows does not work

    Hello,

    In my Excel sheet I've ran a macro which was not 100% correct yet, causing it to creating blank rows until the bottom of the sheet. It happened because the macro contains the command CTRL+SHIFT+DOWN but at the time there was no value at all in a cell, so it selected all rows until row 1,048,576. Suddenly my file is now huge and keeps freezing all the time.

    I've tried selecting the 1st blank row (in this case row 100 or so), then CTRL+SHIFT+DOWN to select all rows until the bottom of the sheet, and then delete these rows. Excel tries to process this and it takes a minute or 2 to do so, but after it's done loading the rows are all still there. Somehow it won't let me delete these empty rows.
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Deleting empty rows does not work

    After you have selected all the rows, are you using the Delete key or the Delete icon on th Home Ribbon? You need to use the second one. Then it's probably best to Save, Close and Re-open the workbook,
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-23-2023
    Location
    Amsterdam
    MS-Off Ver
    Office 365
    Posts
    22

    Re: Deleting empty rows does not work

    Such a simple solution for such a pain in the ***, thank you very much!

    Edit: celebrated too early, still doesn't work...
    Last edited by DeJans1; 05-26-2023 at 04:05 AM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,334

    Re: Deleting empty rows does not work

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    01-23-2023
    Location
    Amsterdam
    MS-Off Ver
    Office 365
    Posts
    22

    Re: Deleting empty rows does not work

    Maybe I celebrated too early... In the test file which I have attached, it worked. But in the real file that I'm using (much bigger than only the 1 sheet in the test file; I deleted all the redundant sheets before uploading) it won't work, even with the Delete button in the Home ribbon.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Deleting empty rows does not work

    Are you sure you are selecting the entire rows? Or choosing to delete entire rows when using the Delete icon?

  7. #7
    Registered User
    Join Date
    01-23-2023
    Location
    Amsterdam
    MS-Off Ver
    Office 365
    Posts
    22

    Re: Deleting empty rows does not work

    Yup, pretty sure. I'm literally selecting row nr. 100, then CTRL+SHIFT+DOWN to select all rows.
    Then going to Home > Cells > Delete (arrow down) > Delete sheet rows.

    Loads for a minute but then nothing happens.

  8. #8
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Deleting empty rows does not work

    Hi there,

    Just a random thought as we don't have sight of the actual workbook - could the problem be associated with the array formulas in column P? Would it help to clear all of the unused array formulas in that column before deleting the unwanted rows?

    Regards,

    Greg M

  9. #9
    Registered User
    Join Date
    01-23-2023
    Location
    Amsterdam
    MS-Off Ver
    Office 365
    Posts
    22

    Re: Deleting empty rows does not work

    Wanted to try what you proposed, so I saved the file under a different name to have a second back-up file, and suddenly all the empty rows are deleted.

    I think I'm fine for now, still don't know what fixed it but okay

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Deleting empty rows does not work

    In my original answer, I said that, after deleting the rows, you needed to save, close and re-open the file. I think you may also have columns that need tidying up.

    Note: you have a circular reference in cell P2: =IF(P2="Walstijd",SUM(N3:INDEX(P3:$P$82,MATCH(TRUE,(R3:$R$82=""),0))),"")

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Deleting empty rows does not work

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  12. #12
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Deleting empty rows does not work

    Hi again,

    Many thanks for your feedback and also for the (probably undeserved!) Reputation increase - much appreciated

    Glad to hear that things seem to be working correctly for you now.

    Best regards,

    Greg M

  13. #13
    Registered User
    Join Date
    01-23-2023
    Location
    Amsterdam
    MS-Off Ver
    Office 365
    Posts
    22

    Re: Deleting empty rows does not work

    Quote Originally Posted by TMS View Post
    In my original answer, I said that, after deleting the rows, you needed to save, close and re-open the file. I think you may also have columns that need tidying up.

    Note: you have a circular reference in cell P2: =IF(P2="Walstijd",SUM(N3:INDEX(P3:$P$82,MATCH(TRUE,(R3:$R$82=""),0))),"")
    You were right, I wrongly assumed that couldn't be a part of the solution

    Thanks for pointing me the circular reference as well!

  14. #14
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Deleting empty rows does not work

    You're welcome. Thanks for the rep.

+ 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. Deleting empty rows if specific cell in row is empty
    By csynic in forum Excel General
    Replies: 0
    Last Post: 07-06-2011, 01:43 AM
  2. Autofilter/delete empty rows is deleting non-empty rows!
    By oOarthurOo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-05-2010, 12:31 PM
  3. Deleting empty rows
    By Turion in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2010, 04:44 AM
  4. deleting empty rows
    By kaipan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-28-2009, 04:17 PM
  5. Deleting Empty Rows
    By modytrane in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2008, 02:15 PM
  6. Deleting All Empty Rows
    By bodhisatvaofboogie in forum Excel General
    Replies: 3
    Last Post: 05-18-2006, 07:40 AM
  7. Deleting non empty rows
    By Jan Kronsell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-22-2005, 07:05 PM
  8. Deleting empty rows
    By excelnoobs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2005, 07:28 PM

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