+ Reply to Thread
Results 1 to 10 of 10

Delete rows from the bottom up

  1. #1
    Registered User
    Join Date
    06-29-2016
    Location
    Aarhus, Denmark
    MS-Off Ver
    2013 and 2016
    Posts
    23

    Delete rows from the bottom up

    Hello,

    I have the following code:
    Please Login or Register  to view this content.
    Is it possible for the macro to work from the bottom-up? By this i mean that it should delete the duplicate which is placed first in the range. (E.g. if there is a duplicate in B19 and B24, it should delete the duplicate in B19 first. Atm it's reversed.

    Can you please help me?
    Thanks in advance

  2. #2
    Valued Forum Contributor Kamboj's Avatar
    Join Date
    09-25-2014
    Location
    India
    MS-Off Ver
    2003 - 2010
    Posts
    430

    Re: Delete rows from the bottom up

    change delete code line as

    Please Login or Register  to view this content.
    Kamboj
    _________________________________________________________________________________
    Mark the thread as SOLVED if my answer satisfy you.

  3. #3
    Registered User
    Join Date
    06-29-2016
    Location
    Aarhus, Denmark
    MS-Off Ver
    2013 and 2016
    Posts
    23

    Re: Delete rows from the bottom up

    Hi Kamboj,

    Thanks for you response!
    This doesn't seem to change anything?

    Let me try to reformulate the problem:
    I want the macro to delete the cells in the top of the range first, so if a duplicate is in B19 and B24, i want the macro to delete cell B24.

    Thanks again!

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

    Re: Delete rows from the bottom up

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-29-2016
    Location
    Aarhus, Denmark
    MS-Off Ver
    2013 and 2016
    Posts
    23

    Re: Delete rows from the bottom up

    This doesn't seem to work either John. Thanks for your response!

  6. #6
    Valued Forum Contributor Kamboj's Avatar
    Join Date
    09-25-2014
    Location
    India
    MS-Off Ver
    2003 - 2010
    Posts
    430

    Re: Delete rows from the bottom up

    use this
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-29-2016
    Location
    Aarhus, Denmark
    MS-Off Ver
    2013 and 2016
    Posts
    23

    Re: Delete rows from the bottom up

    Hi Kamboj,

    Nothing seems to happen when i run the macro you just sent me.

    Should i insert anything into the "". Excuse me if i ask dumb questions, i am rather new when it comes to VBA.

    Thanks!

  8. #8
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Delete rows from the bottom up

    As long as there's duplicates this will work:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  9. #9
    Registered User
    Join Date
    06-29-2016
    Location
    Aarhus, Denmark
    MS-Off Ver
    2013 and 2016
    Posts
    23

    Re: Delete rows from the bottom up

    Hi Robert,
    It works perfect now, even when no duplicates exist. Thanks a lot!

  10. #10
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Delete rows from the bottom up

    It works perfect now, even when no duplicates exist. Thanks a lot!
    What I actually meant was that it will delete all duplicates from the bottom up. It will of course run (though do nothing) if there's no duplicates.

    I'm glad we got it sorted for you and thanks for the rep

    Robert
    Last edited by Trebor76; 07-13-2016 at 08:26 AM.

+ 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. Replies: 13
    Last Post: 12-20-2022, 09:11 AM
  2. [SOLVED] How do I delete blank rows at the bottom of my data
    By Interesting Ian in forum Excel General
    Replies: 7
    Last Post: 11-17-2014, 04:59 PM
  3. [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
  4. delete bottom 6 rows
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-01-2009, 07:52 PM
  5. Search column bottom up then delete rows based on value found
    By jaslake in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-08-2009, 10:24 AM
  6. delete extra rows at bottom
    By morgonzola in forum Excel General
    Replies: 4
    Last Post: 02-02-2007, 12:50 AM
  7. [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