I've wrtitten the following macro to Clear certain Rows on a sheet if certain criteria are met on another sheet.
I keep getting a Compile Error: Block If without End If. The End Sub is highlighted. WHY? And how do I fix it?
Sub CLEAR_ROW()
'
' IF Sheets("ENTRY FORM").Range("k75") = 0 Then
Sheets("data").Rows("16:16").CLEAR
If Sheets("ENTRY FORM").Range("k74") = 0 Then
Sheets("data").Rows("15:15").CLEAR
If Sheets("ENTRY FORM").Range("k73") = 0 Then
Sheets("data").Rows("14:14").CLEAR
If Sheets("ENTRY FORM").Range("k72") = 0 Then
Sheets("data").Rows("13:13").CLEAR
If Sheets("ENTRY FORM").Range("k71") = 0 Then
Sheets("data").Rows("12:12").CLEAR
If Sheets("ENTRY FORM").Range("k70") = 0 Then
Sheets("data").Rows("11:11").CLEAR
If Sheets("ENTRY FORM").Range("k69") = 0 Then
Sheets("data").Rows("10:10").CLEAR
If Sheets("ENTRY FORM").Range("k68") = 0 Then
Sheets("data").Rows("9:9").CLEAR
If Sheets("ENTRY FORM").Range("k67") = 0 Then
Sheets("data").Rows("8:8").CLEAR
If Sheets("ENTRY FORM").Range("k66") = 0 Then
Sheets("data").Rows("7:7").CLEAR
End If
End Sub
I keep getting a Compile Error: Block If without End If. The End Sub is highlighted. WHY? And how do I fix it?
Sub CLEAR_ROW()
'
' IF Sheets("ENTRY FORM").Range("k75") = 0 Then
Sheets("data").Rows("16:16").CLEAR
If Sheets("ENTRY FORM").Range("k74") = 0 Then
Sheets("data").Rows("15:15").CLEAR
If Sheets("ENTRY FORM").Range("k73") = 0 Then
Sheets("data").Rows("14:14").CLEAR
If Sheets("ENTRY FORM").Range("k72") = 0 Then
Sheets("data").Rows("13:13").CLEAR
If Sheets("ENTRY FORM").Range("k71") = 0 Then
Sheets("data").Rows("12:12").CLEAR
If Sheets("ENTRY FORM").Range("k70") = 0 Then
Sheets("data").Rows("11:11").CLEAR
If Sheets("ENTRY FORM").Range("k69") = 0 Then
Sheets("data").Rows("10:10").CLEAR
If Sheets("ENTRY FORM").Range("k68") = 0 Then
Sheets("data").Rows("9:9").CLEAR
If Sheets("ENTRY FORM").Range("k67") = 0 Then
Sheets("data").Rows("8:8").CLEAR
If Sheets("ENTRY FORM").Range("k66") = 0 Then
Sheets("data").Rows("7:7").CLEAR
End If
End Sub