Hello,
I have two Solver scenarios (logics) that run as it should when run manually. The two scenarios are similar but different at the same time. They calculate the following:
- Scenario 1: Cheapest combination based on user packs
- Scenario 2: Cheapest combination on a per user basis
Based on what the user inputs in cell E3, running solver will output a price (F3 and F13) for each scenario. We will then take the cheapest price from the two scenarios.
I've tried to automate the process of manually running both Solver scenarios, by recording my steps in a Macro (Ctrl + Shift + A). However, running the Macro immediately gives me a compile error (Sub or Function not defined) and I don't know why.
It would be great if you guys could help me understand the following:
- Why the Macro I've recorded errors immediately? i.e. is there an option I've not ticked in order for the Macro to work with Solver?
- If the Macro worked, I also have a problem. Because the Macro automates the process of using Solver from Scenario 1 and then 2. That means Solver will have Scenario 2 loaded after running the Macro and so running the Macro again will not solve Scenario 1. What will be the best way to fix this problem?
The ideal is the satisfy the above but understand I'm not that close yet.
Thanks in advance![]()
Bookmarks