+ Reply to Thread
Results 1 to 9 of 9

Detect the last filled row in column a and delete all rows after it

  1. #1
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Detect the last filled row in column a and delete all rows after it

    hi all

    i need your help plz

    i need a macro to detect the last filled row in column A, then to delete all rows starting from the next row.

    thanks.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Detect the last filled row in column a and delete all rows after it

    Do you want to delete all the rows except the last one?
    Last edited by davesexcel; 04-08-2013 at 07:25 AM.

  3. #3
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Detect the last filled row in column a and delete all rows after it

    hi

    i have for example a big sheet; the last filled cell in column A is: A1500.

    the macro will detect that the last filled cell in column A (A1500) then will delete all rows starting from A1501 to the end of the sheet.

    thanks

  4. #4
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Detect the last filled row in column a and delete all rows after it

    any help plz?

  5. #5
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Detect the last filled row in column a and delete all rows after it


  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Detect the last filled row in column a and delete all rows after it

    Do you have any data from A1500 onwards? If yes, your last data would not be A1500
    It may be possible if you have a text in A1500, so that we can use it to define the last data

  7. #7
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Detect the last filled row in column a and delete all rows after it

    ok i got it

    the following code will detect the last cell filled in column A then will delete 1000 rows starting from that cell +1

    Please Login or Register  to view this content.
    thanks

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Detect the last filled row in column a and delete all rows after it

    Please Login or Register  to view this content.
    This is hard coding. Why 1000?, not 500.

  9. #9
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Detect the last filled row in column a and delete all rows after it

    all urs, change it based on ur requirement

+ 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