Delete row under condition

Jeeremy7

Board Regular
Joined
May 13, 2020
Messages
110
Office Version
  1. 365
Platform
  1. Windows
Hey Guys,

I'm going to start explaining this simple as possible, let me know if I don't make sense !

In my workbook there's sheet "A" and "B"
If the value on the same row for column F and G is the same on sheet "A" and "B" then delete that row in sheet "A"

Thanks !
 
No as columns D:E are not used within the VBA procedure …​
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I found the problem.. there was some data in column A that I deleted, I added it back and updated my excel on dropbox
If the fix is too much I could just add a clear column A before running your macro, you already helped a lot :) let me know

Thanks again !!
 
Upvote 0
Yes 'cause of your worksheet design …​
VBA Code:
Sub Demo1bb8r()
      Const F = "F7:F#&""¤""&G7:G#"
        Dim V, R&
    With Sheet15
        V = Filter(.Evaluate(Replace("TRANSPOSE(IF(F7:F#>""""," & F & "))", "#", .Cells(.Rows.Count, 6).End(xlUp).Row)), False, False)
    End With
    With Sheet13
        V = Application.Match(.Evaluate(Replace(F, "#", .Cells(.Rows.Count, 6).End(xlUp).Row)), V, 0)
        Application.ScreenUpdating = False
    For R = UBound(V) To 1 Step -1
        If IsNumeric(V(R, 1)) Then .Rows(R + 6).Delete
    Next
        Application.ScreenUpdating = True
    End With
End Sub
 
Upvote 0
Solution
There's a small touch up, I'll try to figure out something but the formula works perfectly thanks again for your big help !! ??
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top