billandrew
Well-known Member
- Joined
- Mar 9, 2014
- Messages
- 743
Having an issue with running the code below inserted into a shape. There is no issue when executing via the editor. Not sure what is incorrect
Sub DeleteMon()
Application.ScreenUpdating = False
Dim lastrow As Long
Dim w As Long
lastrow = Range("C" & Rows.Count).End(xlUp).Row
Sheets("Areas").Activate
For w = lastrow To 6 Step -1
If Cells(w, "C").Value = "Monday" Then
Cells(w, "C").EntireRow.Delete
End If
Next w
End Sub
Sub DeleteMon()
Application.ScreenUpdating = False
Dim lastrow As Long
Dim w As Long
lastrow = Range("C" & Rows.Count).End(xlUp).Row
Sheets("Areas").Activate
For w = lastrow To 6 Step -1
If Cells(w, "C").Value = "Monday" Then
Cells(w, "C").EntireRow.Delete
End If
Next w
End Sub