klafontaine
New Member
- Joined
- May 14, 2019
- Messages
- 3
Hi... it's been 8 years but maybe someone will see this.
I also want to write in VBA, if cell is not blank, then do this.
And then stop. Acting only if the cell is not blank...
This is based on a column of numbers, updated monthly. So when the month is updated, I want the macro to run.
But I get the End If without block if error... over and over.
This is my code so far.
Private Sub Worksheet_Change(ByVal Target As Range)
If IsEmpty(Cells(F3).Value) = False Then Call Macro1
End If
If Not IsEmpty(Cells(F21).Value) Then Call Macro2
End If
If Not IsEmpty(Cells(F39).Value) Then Call Macro3
End If
If Not IsEmpty(Cells(F57).Value) Then Call Macro4
End If
If Not IsEmpty(Cells(F75).Value) Then Call Macro5
End If
If Not IsEmpty(Cells(F93).Value) Then Call Macro6
End If
If Not IsEmpty(Cells(F111).Value) Then Call Macro7
End If
If Not IsEmpty(Cells(F129).Value) Then Call Macro8
End If
If Not IsEmpty(Cells(F147).Value) Then Call Macro9
End If
If Not IsEmpty(Cells(F164).Value) Then Call Macro10
End If
If Not IsEmpty(Cells(F183).Value) Then Call Macro11
End If
If Not IsEmpty(Cells(F201).Value) Then Call Macro12
End If
End Sub
I also want to write in VBA, if cell is not blank, then do this.
And then stop. Acting only if the cell is not blank...
This is based on a column of numbers, updated monthly. So when the month is updated, I want the macro to run.
But I get the End If without block if error... over and over.
This is my code so far.
Private Sub Worksheet_Change(ByVal Target As Range)
If IsEmpty(Cells(F3).Value) = False Then Call Macro1
End If
If Not IsEmpty(Cells(F21).Value) Then Call Macro2
End If
If Not IsEmpty(Cells(F39).Value) Then Call Macro3
End If
If Not IsEmpty(Cells(F57).Value) Then Call Macro4
End If
If Not IsEmpty(Cells(F75).Value) Then Call Macro5
End If
If Not IsEmpty(Cells(F93).Value) Then Call Macro6
End If
If Not IsEmpty(Cells(F111).Value) Then Call Macro7
End If
If Not IsEmpty(Cells(F129).Value) Then Call Macro8
End If
If Not IsEmpty(Cells(F147).Value) Then Call Macro9
End If
If Not IsEmpty(Cells(F164).Value) Then Call Macro10
End If
If Not IsEmpty(Cells(F183).Value) Then Call Macro11
End If
If Not IsEmpty(Cells(F201).Value) Then Call Macro12
End If
End Sub