+ Reply to Thread
Results 1 to 3 of 3

Trying to delete rows after last actual data row

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

    Trying to delete rows after last actual data row

    When I hit Ctrl/End the cursor moves to row 1046470. My actual valid data ends at row 2326.

    I had this problem in the past and got the following macro solution from help on the forum.

    Please Login or Register  to view this content.
    This did not work this time - I may have still been on excel 2003 and am now on excel 2016.

    I'm attaching a text file of a macro I've been running to try to reset the worksheet to the valid last row.
    I commented out all of the different options I've tried after they failed to solve the issue.


    I also selected about 5000 rows and used the 'Clear All' option and then deleted them.

    I did a save and exit the workbook after each attempt but nothing has worked yet.

    Thanks in advance for any help.
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Trying to delete rows after last actual data row

    If it's knwon that 2326 is the last used row#
    Try
    Please Login or Register  to view this content.
    You still have to save the file for the CTRL + END to recognize the new last used row.

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

    Re: Trying to delete rows after last actual data row

    Hi Jonmo1,

    Thanks for the idea, but it did not work in this case. I ran that code exactly as is, then saved it and exited the workbook. When I re-opened it and did CTRL + END it went to row 1,046,470 again.

    This was a really odd problem and I still don't know what to do in case it re-occurs. I also tried selecting from row 2327 to end of file (1,046,070) then I did a 'Clear All' function followed by 'Delete Rows'
    and after saving that the workbook went from 8 kb to 188 kb.

    I decided this was de-railing me too much so I deleted the worksheet from the workbook, then copied a different worksheet to the same name as the one I deleted and did change alls to the formulas
    as appropriate.

    This work-around has worked.

    Thanks for your time and I will mark this solved.

+ 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. Criteria to show what rows from data are shown, not actual filter
    By Butcher1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-29-2014, 12:45 PM
  2. [SOLVED] Moving data from Rows to columns and delete repeated rows
    By mikearmanios in forum Excel General
    Replies: 5
    Last Post: 04-20-2014, 06:25 AM
  3. [SOLVED] Move data on duplicate rows (different columns) to one row and delete extra rows?
    By Sagwa in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2014, 08:25 AM
  4. Replies: 4
    Last Post: 11-13-2013, 11:15 AM
  5. Replies: 1
    Last Post: 08-24-2013, 07:01 AM
  6. [SOLVED] Delete blank rows between data rows, shift rows up, then repeat
    By excelactuary in forum Excel General
    Replies: 2
    Last Post: 03-11-2013, 11:53 AM
  7. [SOLVED] VBA insert/delete rows to accommodate exact number of rows from incoming data
    By iloc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2012, 06:19 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