How to remove data from data table


#1

Templates.xlsx (15.9 KB)

i want to delete the details of employee whose total duration is “0” without using filter table activity or delete table activity can anyone help me out


#2

You can run this macro:

Sub deleteRows()
Dim pattern As String
Dim j As Integer
j = 9
pattern = "0"
RowCount = ActiveSheet.UsedRange.Rows.Count
Dim i As Integer

For i = 1 To RowCount
’MsgBox Cells(i, j)
If Cells(i, j) = pattern Then
Cells(i, j).EntireRow.Delete
i = i - 1
RowCount = RowCount - 1
End If
Next i
End Sub

Please set the pattern and column number according to your requirement.