What you do now manually sounds like something that Goal Seek or Solver could replicate.
https://www.excel-easy.com/examples/goal-seek.html
https://www.excel-easy.com/data-analysis/solver.html

You have not described your budget in any detail, but, my best guess is that this factor could be solved for algebraically -- if you were allowed to step away from Excel and look at the problem algebraically. If this is something that you need to do frequently, then I would step away from the spreadsheet and look at the problem that way.