Solved

Editing Goal Seek in Excel

Posted on 2003-11-21
3
791 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
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…

911 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

21 Experts available now in Live!

Get 1:1 Help Now