Can someone please change the line below in red to instead allow the macro to delete two blank formulated rows below the last filled entry in Column A?
I just can't figure it out.
I just can't figure it out.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
Dim RowNum As Long
RowNum = Target.Row
If WorksheetFunction.CountA(Range("D" & RowNum & ":S" & RowNum)) > 1 Then
Range("D" & RowNum & ":S" & RowNum).ClearContents
Range("D" & RowNum).Select
MsgBox "Please only make one entry per row"
Range("D" & RowNum + 1, Range("D" & RowNum + 2)).EntireRow.Delete
End If
End If
End Sub