IF THEN ELSE Statement Needed

  • Thread starter Thread starter Mike Cross
  • Start date Start date
M

Mike Cross

Problem:

I have a current Macro that does a goal seek. However,
if any of 5 cells is blank or 0 then the Macro crashes.

I am trying to write code that will stop the Macro if ANY
of the five cells has a 0 or a blank value. Otherwise,
run the Macro.

Current Macro:
Application.ScreenUpdating = False
Sheets("Program Input").Select
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
 
Back
Top