[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Need to write a GoalSeek function in C#

Posted on 2004-10-27
3
Medium Priority
?
2,032 Views
Last Modified: 2007-12-19
Hello,

I am in the process of moving over an Excel spreasheet with macros in it to a web application.  All is well, except for this one cell which contains within it a GOALSEEK function. I have no idea what the algorithm is to replicate this function, or if I can import some DLL to simply access it... Help!

Thanks in advance,

Julie

Range("E31").GoalSeek Goal:=0, ChangingCell:=Range("D31")
0
Comment
Question by:anoukmercier
[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
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
Razzie_ earned 750 total points
ID: 12424996
The Goalseek function takes an input parameter and a target ouput, and will change a variable so that using a specific mathematical aloghritm, the target output is reached, and will return the value of the changing variable. (what a lousy sentence :)

If you'll always do the same mathematical aloghritm, for example finding the correct rate for a monthly payment, you might want to write that function yourself? Depending on how complex it is, it might be easier then importing Excel functions (I have no idea how that works).

Cheers,

Razzie
0
 

Author Comment

by:anoukmercier
ID: 12425788
You're right... I was hoping for some sort of magic formula, I guess, but I finally rolled up my sleeves to try and figure out what the heck was happening in the background, and once I figured out what that function did, I was able to replicate some code (had to create a while loop to iterate through the target value, and re-calculate all functions).

Thanks,

Julie
0
 
LVL 8

Expert Comment

by:Razzie_
ID: 12428155
Glad you figured it out :)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

656 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