i have a function in excel and i want the answer of that be max by changing variables.…
- User
i have a function in excel and i want the answer of that be max by changing variables. the variables are in am3 to ao3.and target cell is in ap3.dont use solver. and i have a constraint that am3+an3+ao33=100
- Assistant
You can use the
MAXfunction along with anIFcondition to achieve this. Assuming your function is in cellAP3, and the constraint that the sum ofAM3,AN3, andAO3equals 100, you can follow these steps:-
In cell
AQ3, enter the formula:=IF(AM3+AN3+AO3=100, AP3, "Invalid"). This will only show the result of the function if the constraint is met. -
In another cell, such as
AR3, you can find the maximum value with the following formula:=MAX(0, AQ3). This will show the maximum value between 0 and the result of the function if the constraint is met.
However, it's important to note that Excel won't automatically find the optimal values for
AM3,AN3, andAO3to maximize the function without using Solver or some other optimization tool. The given solution will only allow you to check the value of the function and find the maximum level once you manually change the values in cellsAM3,AN3, andAO3. -