Great macro works
So i am not sure that i understand your question in 100%. Yes i want use solver for every single day. Maybe i give example how macro should look like.
In cells B38:B59 i have date and i want simulation for every single day. For example excel take cell B49 (May 22, 2013) and make simulation:
1) AVERAGE for XLU from May21 to Apr24 and same for single stock.
2) C7:AG7 take Adj Close* from sheets for date May21 and make formula
3) C8:AG8 take open price from sheets for May 22 << same for cell H26
4) C9:AG9 take close price from sheets for May 22 << same for cell H27
5) next step is using solver and copy result from J30 to B49 (May 22, 2013)
So i think the best way to do that is to use loop, and excel will stop using loop when meet empty cell in my example B60, but i dont know how to make it.
Edit:
I added something to your code
Do While ActiveCell.Value <> ""
(...)
ActiveCell.Offset(1, 0).Range("B3").Select
Loop
But it does not help, it works only one time and stoped.
Bookmarks