IF THEN ELSE Statement Needed

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
 
M

Mike Cross

WHOOPS! This was my first post so I did it twice
(thought it didn't "take").
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top