Link to home
Start Free TrialLog in
Avatar of anoukmercier
anoukmercierFlag for United States of America

asked on

Need to write a GoalSeek function in C#

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")
ASKER CERTIFIED SOLUTION
Avatar of Razzie_
Razzie_

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anoukmercier

ASKER

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
Avatar of Razzie_
Razzie_

Glad you figured it out :)