+ Reply to Thread
Results 1 to 4 of 4

Delete Bottom Row Macro Help

  1. #1
    Forum Contributor
    Join Date
    06-15-2013
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    213

    Delete Bottom Row Macro Help

    Hello Everybody, I have the following macro that Deletes the bottom row after searching Column A for Duplicates. I need to alter it to only delete Columns A-F of the bottom row. Can anybody help me.

    Sub DeleteBottomRow()
    Range("A2").Select
    rowx = 1
    Do Until Cells(rowx + 1, 1).Value = ""
    If UCase(Cells(rowx, 1).Value) = UCase(Cells(rowx + 1, 1).Value) Then
    Cells(rowx + 1, 1).EntireRow.Delete
    Else
    rowx = rowx + 1
    End If
    Loop

    Beep

    End Sub

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete Bottom Row Macro Help

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Delete Bottom Row Macro Help

    Using your example this should do it:

    Note: I would do it differently than how you are doing it but you asked for an alteration of the existing code

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-15-2013
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: Delete Bottom Row Macro Help

    Thank You it works!

+ 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] Excel 2007 : Blank Rows At Bottom of Sheet Will Not Delete
    By KSSLR in forum Excel General
    Replies: 3
    Last Post: 06-20-2012, 01:15 PM
  2. [SOLVED] Help with a macro to delete empty (but not blank) cells OR sort blanks to the bottom
    By Cyali in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2012, 09:04 PM
  3. delete bottom 6 rows
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-01-2009, 07:52 PM
  4. delete extra rows at bottom
    By morgonzola in forum Excel General
    Replies: 4
    Last Post: 02-02-2007, 12:50 AM
  5. [SOLVED] How do I delete blank rows at the bottom of a spreadsheet to get .
    By Miklaurie in forum Excel General
    Replies: 1
    Last Post: 01-26-2005, 11:06 AM

Tags for this Thread

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