Macro for using solver function using visual basic

Joined
Jul 24, 2009
Messages
1
Reaction score
0
I need to create a macro to use solver function in excel. This function has to loaded from the Tools Menu in excel using Add-In.

I am attaching herewith a sample data as to what exactly I have to do.

In the Set Target Cell, input has to be Cell BB

In the Equal to, we have to select Value of and that value has to be of Cell J

In the By Changing Cells, we have to select 3 cells, Cell V, Cell AZ, Cell BA

The Problem:

We have to manually key in the figure of Equal To i.e. Cell J. So we need to write a macro and define parameters there so that with a single command, we can execute this function on all rows.

I am pasting below raw data and in the second sheet processed data i.e. the way it will look after using solver function. I have some 10,000 rows on which this has to be applied. So need a macro to execute this. Also attaching it in excel format.

Raw Data

InstrumentSymbolOptionDateExpiryStrike PriceOpenHighLowCloseLTPSettle PriceNo. of contractsTurnover in LacsOpen IntChange in OITime to maturityTimeNifty CloseMoneynessRFH.VolTheoretical cskkmcOPTIDXNIFTYCE01-Aug-0730-Aug-074200256255.5176180.85184180.85662814588.58525400144500290.0794524345.850.0337990.0436455250.165205180.8501926-0.35177.4545


Processed Data i.e. result after using solver

InstrumentSymbolOptionDateExpiryStrike PriceOpenHighLowCloseLTPSettle PriceNo. of contractsTurnover in LacsOpen IntChange in OITime to maturityTimeNifty CloseMoneynessRFH.VolTheoretical cskkmcOPTIDXNIFTYCE01-Aug-0730-Aug-074200256255.5176180.85184180.85662814588.58525400144500290.0794524345.850.0337990.0436455250.180607186.405984-0.300494.999921180.85


Really need help.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top