M
Mike Cross
Problem:
I have a current Macro that does a goal seek. However,
if any of 4 cells is blank or 0 then the Macro crashes.
I am trying to write code that will stop the Macro if ANY
of the four cells has a 0 or a blank value. Otherwise,
run the Macro. I think it will take a series of IF/THEN
ELSE statements but I am not proficient at writing them.
Any ideas?
Current Macro:
Application.ScreenUpdating = False
Sheets("Cash Flow").Select
Range("D49").Select
Range("D49").GoalSeek Goal:=1, ChangingCell:=Sheets
("Program Input").Range( _
"J192")
Sheets("Program Input").Select
Range("J192").Select
Application.ScreenUpdating = True
End Sub
Thanks in advance for your response!
Regards,
Mike
I have a current Macro that does a goal seek. However,
if any of 4 cells is blank or 0 then the Macro crashes.
I am trying to write code that will stop the Macro if ANY
of the four cells has a 0 or a blank value. Otherwise,
run the Macro. I think it will take a series of IF/THEN
ELSE statements but I am not proficient at writing them.
Any ideas?
Current Macro:
Application.ScreenUpdating = False
Sheets("Cash Flow").Select
Range("D49").Select
Range("D49").GoalSeek Goal:=1, ChangingCell:=Sheets
("Program Input").Range( _
"J192")
Sheets("Program Input").Select
Range("J192").Select
Application.ScreenUpdating = True
End Sub
Thanks in advance for your response!
Regards,
Mike