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.write a vba to find the value of am3 an3 and ao3
- Assistant
You can use the following VBA code to find the value of AM3, AN3, and AO3 that will maximize the value in AP3, subject to the constraint that AM3 + AN3 + AO3 = 100. This code uses a brute force approach to iterate over all possible combinations of AM3, AN3, and AO3, and then finds the combination with the highest value in AP3.
vba
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.