Please refer to attached file.
Sample data is attached.
Would need to find last row and start deleting from bottom up.
I need a VB Code to delete the row if following conditions are met
Delete Row if value in Column D,E and F is all zero.
____________________________________________
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
I needed to add one more criteria.
If value is "000-00-0000" in column B delete Row.
Please let me know if you have any questions.
Thanks.
Riz
PHP Code:
Sub ArrayDelete() Dim Arr(), Rng As Range Dim J As Long, W As Long, Z As Byte, Col As Byte
Set Rng = [b5].CurrentRegion Arr() = Rng.Value: Col = Rng.Columns.Count ReDim dArr(1 To Rng.Rows.Count, 1 To Col) For J = 1 To UBound(Arr()) If Arr(J, 2) = "000-00-0000" And Arr(J, 4) = 0 And Arr(J, 5) = 0 And Arr(J, 6) = 0 Then Else W = W + 1 For Z = 1 To Col dArr(W, Z) = Arr(J, Z) Next Z End If Next J If W Then Rng.Value = "" Rng(1).Resize(W, Col).Value = dArr() End If End Sub
Bookmarks