+ Reply to Thread
Results 1 to 11 of 11

# Rows in worksheet has run amok

  1. #1
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    # Rows in worksheet has run amok

    I don't know what happened to cause this but one of my worksheets shows end of file with 1,041,584 rows. My actual data only uses 2,348 rows. When I use keystrokes ctrl-end it shows me row 1,041,584 after a long delay. Saving the file also seems to take much longer. I've tried selecting the rows between 2348 and 1,041,584 and after I get a warning msg saying the operation will take a long time, I press ok and it does complete but when I do ctrl-end it still shows the 1+ Million rows.

    I have another workbook with same number of worksheets and same functions in all the worksheets and they use about 4,000 kb of space - the one with the runaway rows uses almost 12,000 kb.

    I am using excel 2016.

    Thanks for any insight/solution.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: # Rows in worksheet has run amok

    Once you have deleted those empty rows between 2348 and 1041584, you must save the workbook in order for the change to take effect.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: # Rows in worksheet has run amok

    Thanks and that works however I have a problem trying to delete the rows. When I select the rows using the row number and use the down key to select the rows it takes a very long time - I used that method for about 70,000 rows, then deleted them then saved the file and the size used dropped.

    When I try Selecting the row and hit ctrl-shift-end keys it hilites them (very slowly) but when I hit delete, then save, then close - the file size does not change - I believe that is just deleting the cell content.

    Is there a quicker way to delete the rows - I think it will take me at least one hour of scrolling the row numbers column to delete all the rows.

    By the way the file size is about 240,000 kb at this point.

    Thanks for your help

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: # Rows in worksheet has run amok

    QUICKER CLEANER WAY ... is to make a new sheet and just copy the rows with data, delete old sheet, rename new sheet to old sheets name.

  5. #5
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: # Rows in worksheet has run amok

    I reference cells in my problem worksheet from another worksheet so I think I'd get an invalid ref message on that worksheet. Not sure if it would resolve after re-naming.

    I did find a quicker way though selecting the extra rows using the vba rows command then deleting them:

    Please Login or Register  to view this content.
    Thanks again for your help and I will mark this thread closed

  6. #6
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: # Rows in worksheet has run amok

    NO PROBLEM ... If you cut and paste instead of copy/paste the links will follow so you will still have the original formula working.

  7. #7
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: # Rows in worksheet has run amok

    This will even be quicker

    Sub DELETE_BLANK_ROWS()
    '
    ' DELETE_BLANK_ROWS Macro
    '

    '
    Rows("2349:900000").Delete Shift:=xlUp
    End Sub

  8. #8
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: # Rows in worksheet has run amok

    Here's a macro that delete rows that are blank in column A of the active sheet

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: # Rows in worksheet has run amok

    Ok, got it, that's good to know for any future issues like this.

  10. #10
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: # Rows in worksheet has run amok

    If you want to consider something else....

    Maybe...

    http://dmcritchie.mvps.org/excel/lastcell.htm

    Look for Sub makelastcell()
    HTH
    Regards, Jeff

  11. #11
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: # Rows in worksheet has run amok

    Thanks Jeff,

    I will keep that documentation in case this re-occurs.

    Best Regards,
    Pongmeister

+ 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] Copy rows from worksheet to another worksheet that date is not current year
    By Lottoman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-01-2016, 03:38 PM
  2. Parsing rows in one worksheet to generate one or several rows in another worksheet?
    By svliegen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2015, 06:27 PM
  3. Macro to hide rows on a worksheet, based on a cell's value on another worksheet.
    By buttercup116 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2014, 10:47 AM
  4. Replies: 3
    Last Post: 10-16-2012, 09:02 AM
  5. [SOLVED] Copy rows from my main worksheet to another worksheet based on data in one cell
    By gcol in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-08-2012, 05:12 AM
  6. [SOLVED] Copying selected cells from multiple rows and columns from worksheet to worksheet
    By janlindgren in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2012, 02:58 AM
  7. Hide/Unhide Rows in One Worksheet Based on Values in Cells in Another Worksheet
    By xponent_es in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2011, 03:26 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