You better do as the yellow banner says i.e. upload a file if you wish to get help.
Lookin at your problem you have defined Pi, Ni, N and k but not n. You are using the "Log" function and I assume you mean the function based on 10 as excel has a LOG function where one specify the number and the base. Then there is the "LOG10" function where excel assumes your base is 10.
Running Solver with vba you will need to set a reference to Solver in Visual Basic (VB -> Tools -> References and mark box named Solver)
For the loop you could use something like
where "”$??$$ & i," is your target cell that you need to specify a column, as well as change the MaxMin to what you wish your target value to be Min or Max or a value of. And then you probably has some constraints that should be added.
Alf
Bookmarks