Hi,
I have the below updated with the help of another user. After pressing the button on Sheet2, Sheet1 filters and deletes rows based on the conditions. I want it to create a new separate file saved in the same folder with the same button. So summary the output after pressing button on Sheet2 would be:
-Sheet1 will filter and delete rows
-Separate file saved in the same folder with the filtered Sheet1
-Popup message to say "New File Created"
Sub RowFilter()
Dim N As Long, i As Long
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Sheet1")
N = ws.Cells(ws.Rows.Count, "L").End(xlUp).Row
For i = N To 1 Step -1
If ws.Cells(i, "C") = "IP" Or ws.Cells(i, "H") = "0" And ws.Cells(i, "AK") = "0" Then
ws.Cells(i, "H").EntireRow.Delete
End If
Next i
End Sub
Thank you.
I have the below updated with the help of another user. After pressing the button on Sheet2, Sheet1 filters and deletes rows based on the conditions. I want it to create a new separate file saved in the same folder with the same button. So summary the output after pressing button on Sheet2 would be:
-Sheet1 will filter and delete rows
-Separate file saved in the same folder with the filtered Sheet1
-Popup message to say "New File Created"
Sub RowFilter()
Dim N As Long, i As Long
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Sheet1")
N = ws.Cells(ws.Rows.Count, "L").End(xlUp).Row
For i = N To 1 Step -1
If ws.Cells(i, "C") = "IP" Or ws.Cells(i, "H") = "0" And ws.Cells(i, "AK") = "0" Then
ws.Cells(i, "H").EntireRow.Delete
End If
Next i
End Sub
Thank you.