Click here to Skip to main content
15,920,111 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
See more:
How to use Excel’s "Goal seek" feature in C#.net with a code example? I found only one related post in MSDN regarding this but that was not clear and the sample code they provided was ...
Posted
Updated 18-May-16 21:38pm
v3
Comments
m@dhu 28-Feb-11 2:08am    
Shortened the subject.
Manfred Rudolf Bihy 28-Feb-11 2:14am    
If you have any issues with their code sample regarding this subject, you should use their forum to ask your questions. Besides that it is really not helpful if you don't tell us what issues you have with their code. A link to that page would also have been nice. Maybe some of us could help you understand their code sample.

 
Share this answer
 
Comments
viswanathAkella 1-Mar-11 9:12am    
Hi,
Those threads are started by me only upto now i didn't get solution so that i raise same thread in this forum also.
Regards,

Viswanath.
In this c# example, the formula that returns the target value is in the Cells[4,2], the value to be adjusted is in Cells[3,5] and the target value is zero. I tried it in VS 2019 and it worked.

((Range)rgout.Cells[4, 2]).GoalSeek(0, rgout.Cells[3,5]);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900