+ Reply to Thread
Results 1 to 3 of 3

Deleting Rows after Last Record using VBA

  1. #1
    Forum Contributor
    Join Date
    06-13-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    245

    Smile Deleting Rows after Last Record using VBA

    Hello, I am running Excel 2003 on Windows XP. I am hoping someone will be kind enough to assist me in the following VBA problem I have:

    I need a VBA macro to delete all subsequent rows (to the end of the worksheet) in worksheet named Sheet1 after the last record in column A.

    Please refer to attached workbook. The last record in column A is located at row 3253. I need to delete all rows after this last record to the end of the worksheet.

    Any help is greatly appreciated.

    Kind regards,

    Chris.
    Attached Files Attached Files
    Last edited by longbow007; 10-27-2012 at 05:08 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Deleting Rows after Last Record using VBA

    Hi, Chris,

    deleting rows will just fill in fresh ones:
    Please Login or Register  to view this content.
    Maybe you want them hidden:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Deleting Rows after Last Record using VBA

    If your Data is continuous without any blank rows then try the below code

    Please Login or Register  to view this content.
    If your Data is having blank rows then change the

    Please Login or Register  to view this content.
    To

    Please Login or Register  to view this content.
    Hope this helps!


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Forum Contributor
    Join Date
    06-13-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    245

    Re: Deleting Rows after Last Record using VBA

    Thank you HaHoBe and Sixthsense for your excellent VBA code - very much appreciated.

    Kind regards,

    Chris

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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