Solved

Editing Goal Seek in Excel

Posted on 2003-11-21
3
788 Views
Last Modified: 2012-05-04
i set up a macro to output the goal-seek result from a BINOMDIST cell:

Sub Macro1()
          Range("C5").GoalSeek Goal:=Range("E4"), ChangingCell:=Range("B4")
End Sub

Where C5 has the value:
  =BINOMDIST(B4,C4,D4,FALSE)

I wrote the program to help find the critical values of a binomial distribution, but sometimes running the macro results in extremely low results like:
  -152537377.264605

and then trying to re-run the macro results in a
  Run Time Error '1004':
  Reference is not valid.

error.

Firstly is there a way to stop the error, secondly is this a good way to go about finding the critical values, and thirdly (if not) what's a better way?

Thanx in advance
Synthetics
0
Comment
Question by:Synthetics
3 Comments
 
LVL 50

Accepted Solution

by:
Dave Brett earned 50 total points
Comment Utility
B4 has to be an Integer so I think you should be wither be using Solver instead of Goalseek or use an INT(Range("B4")) in your goalseek

Cheers

Dave

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now