VBA Help Delete Row if 3 conditions met?

Status
Not open for further replies.

LNG2013

Active Member
Joined
May 23, 2011
Messages
466
Hello I need help with a bit of VBA code.

I need the code to look at Column AI.
Column AI can have a value of 0-7.
If a Row in Column AI has a value of "0" check column Probed, If it is empty check Notes, if also empty delete that Row.

In the example below row 8 would be deleted as AI = 0, Probed is empty, and so is Notes.


[TABLE="width: 500"]
<tbody>[TR]
[TD]1
[/TD]
[TD]Date
[/TD]
[TD]Probed
[/TD]
[TD]Area
[/TD]
[TD]Team
[/TD]
[TD]AI
[/TD]
[TD]Match
[/TD]
[TD]Notes
[/TD]
[TD]GI
[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]9/1/2019[/TD]
[TD][/TD]
[TD][/TD]
[TD]Team 1[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]9/5/2019[/TD]
[TD][/TD]
[TD][/TD]
[TD]Team 11[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]9/7/2019[/TD]
[TD]Not[/TD]
[TD][/TD]
[TD]Team 3[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]9/12/2019[/TD]
[TD][/TD]
[TD][/TD]
[TD]Team 4[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]9/15/2019[/TD]
[TD]Not[/TD]
[TD][/TD]
[TD]Team 7[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]9/22/2019[/TD]
[TD][/TD]
[TD][/TD]
[TD]Team 9[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]9/30/2019
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Team 4
[/TD]
[TD]0
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]10/1/2019[/TD]
[TD][/TD]
[TD][/TD]
[TD]Team 2[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]10/02/2019[/TD]
[TD][/TD]
[TD][/TD]
[TD]Team 6[/TD]
[TD]0[/TD]
[TD][/TD]
[TD]other[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



Thank you for any and all help!
 
Last edited:

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Status
Not open for further replies.

Forum statistics

Threads
1,223,888
Messages
6,175,203
Members
452,617
Latest member
Narendra Babu D

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