I have been using Excel to illustrate multiple scenarios about election outcomes over the next three election cycles. The overall purpose is to examine which scenarios result in one party attaining a certain number of seats. I have seven scenarios per cycle, and each cycle builds on the previous.

What I can’t figure out - and this may be something I learn how to do at my bootcamp in a couple weeks - is to automate the process of determining which scenarios and combinations of scenarios result in attainment of a certain number of seats. For example, in the worst-case scenario for 2018, party “A” could lose 10 seats, but in the best possible case they could gain 3. In the next cycle, Party “A” could lose 3 seats, or gain as many as 6.

What tool should I be using to get the computer to try out all 343 permutations to see which combination reaches the target # of seats I’m looking for?

Thanks for any help!