+ Reply to Thread
Results 1 to 10 of 10

Delete all rows below last complete row

  1. #1
    Forum Contributor
    Join Date
    02-21-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    122

    Delete all rows below last complete row

    Hello I need to create a code that will delete all the rows after the last row of data. There are totals and notes sometimes below a list of data that needs to be removed before loading into the system. The number of rows always differs. I need something to find the last row with data in column A and have the macro delete all the rows or even a certain number of rows after that point.

    Can anyone please help??

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Delete all rows below last complete row

    Are formulas included in the data, or can you tell where the data ends by where the formulas start?
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    02-21-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Delete all rows below last complete row

    Yes there is a sum function.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Delete all rows below last complete row

    This will clear all rows below where the first formula occurs in Column A:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-21-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Delete all rows below last complete row

    Is it possible to do this if there is no formula? Simply to delete all rows after the last row/cell with data?

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Delete all rows below last complete row

    This will clear all the cells beyond the last row of data in Column A:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    02-21-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Delete all rows below last complete row

    Thank you very much!!!

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Delete all rows below last complete row

    You're very welcome! Thanks for the rep

  9. #9
    Registered User
    Join Date
    07-20-2013
    Location
    tarapoto
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Delete all rows below last complete row

    Quote Originally Posted by xladept View Post
    This will clear all the cells beyond the last row of data in Column A:

    Please Login or Register  to view this content.
    Amazing, thanks!

    petit palace madrid
    Last edited by kennetandersson; 09-11-2013 at 04:14 PM.

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Delete all rows below last complete row

    @kennet - You're welcome too

+ 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