Solved

Editing Goal Seek in Excel

Posted on 2003-11-21
3
806 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
ID: 9804795
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

685 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