Sory but i don't know why your macro ruin my formula for example in C7 C8 C9, and why you use cell G37
Macro can not use cell G37, Cell G37 is only change average. If Cell G37=20 then average for each stock is for 20 last day so that cell can not be changed. Maybe this way:
1) Macro copy cell B39: to the end,
2) next paste to G37
3) Macro run solver
4) result from J31 copy to the cell B39
5) loop (cell B40, B41 etc) loop stop when meet empty cell.
Something like that but with loop. New file beacuse i added new row.
I modifed your code
WORKS!
BIG THANKS ALF. I am very very happy and appreciate your help and support big thanks again
Bookmarks