Results 1 to 10 of 83

Thread: Delete rows based on match criteria in two excel files or single Excel File

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    We are back to about a year ago, around here
    https://excelfox.com/forum/showthrea...ll=1#post11467
    https://excelfox.com/forum/showthrea...ll=1#post12896
    https://excelfox.com/forum/showthrea...ll=1#post12897



    Quote Originally Posted by fixer
    problem solved .. please delete Thread
    No. Problem is not solved
    I still see at least two issues

    Problem 1
    You still do not understand Lr issue. You still have it wrong….
    Lr variable, we have typically used in many of your macros , ( in the meantime well over a hundred similar macros ) , to determine dynamically the last used cell in a column.

    For example, in your macro, for the first column in the two worksheets :-
    Lr1 is for last row dynamically found for worksheet, Ws1
    Lr2 is for last row dynamically found for worksheet, Ws2

    So it should be

    Let Lr1 = Ws1.Range("A" & Ws1.Rows.Count & "").End(xlUp).Row
    Let Lr2 = Ws2.Range("A" & Ws2.Rows.Count & "").End(xlUp).Row

    Problem 2

    Code:
            If Not MtchedCel Is Nothing Then
            rngDta.Rows(Cnt).EntireRow.Delete Shift:=xlUp
            Else
            
            End If
    Or

    Code:
            If Not MtchedCel Is Nothing Then
            
            Else
            rngDta.Rows(Cnt).EntireRow.Delete Shift:=xlUp
            End If
    You always get that mixed up. Problem is English language and general idiocy. You may never know what you want. Half the time you will get it correct. The other half of the time you will get it wrong.




    Most of the time it continues to appear as if you either do not read or understand anything that anyone anywhere ever writes for you.
    You continue to go around in chaotic circles of multiple duplicate cross posting of the same or very similar issues, and seem to be starting again recently, with even more cross posting of very similar questions.
    Because of this you are now experiencing even more problems: Everyone has a different posting style, and there are usually many ways to solve a problem in VBA. So you are producing a chaotic collection of coding written by many different people, in many different ways. This collection of coding, some working perfectly, some not erroring, but not working properly, you will never, ever, be able to combine to achieve anything over than a total chaotic mess….
    Last edited by DocAElstein; 07-11-2020 at 01:37 PM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

Similar Threads

  1. Replies: 29
    Last Post: 06-09-2020, 06:00 PM
  2. Replies: 3
    Last Post: 10-20-2015, 12:51 PM
  3. VBA To Delete Rows Based On Value Criteria In A Column
    By jffryjsphbyn in forum Excel Help
    Replies: 1
    Last Post: 08-15-2013, 12:45 PM
  4. Replies: 6
    Last Post: 08-14-2013, 04:25 PM
  5. Delete Remove Rows By Criteria VBA Excel
    By marreco in forum Excel Help
    Replies: 5
    Last Post: 12-20-2012, 05:56 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •