Solved

Editing Goal Seek in Excel

Posted on 2003-11-21
3
808 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Increase your protection from Zero Day threats!

Running two Antivirus' is never a good idea.
Taking advantage of Multiple Security layers on the other hand can often save your hide.
See which top notch security software brands have been proven to happily coexist together.
Reduce your chances of becoming a statistic.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to fix hotmail.co.uk email isn't syncing 100% using MS Outlook? 26 53
Office 365 Spam 3 33
Custom fill series 12 38
VBA Lookup Problem 2 11
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

739 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