Hi
I have the following macro
How do i change the part in red to stop the macro from running if any one of Cell F1 and F2 is blank. I tried If F1 = "" and F2 ="" then, but it only stop if one is blank. I need to stop the macro when either is blank. I also tried If F1 = "" or F2 ="" then.
I have the following macro
Code:
Sub add()
Call unprotect
'
' add Macro
'
'
[COLOR=#ff0000]If ActiveCell.Value = "[/COLOR]" Then
MsgBox "Error: Please enter the Number of Questions and the Number Bonds", vbOKOnly, "Error..."
Exit Sub
Else
Dim lRow As Integer
Range("B4").Select
ActiveCell.FormulaR1C1 = "+"
lRow = Range("A" & Rows.count).End(xlUp).Row
If lRow = 1 Then GoTo NextPartOfCode
Range("b4:B4").AutoFill Destination:=Range("B4:B" & lRow)
'ActiveWindow.SmallScroll Down:=0
Range("C4").Select
NextPartOfCode:
Call add_equalsign
Call ValueOfSum
Call protect
End If
End Sub