You have wisely ask only for guidance, not a turnkey solution. Since this is an assignment of some kind, it would be unethical for us to provide a turnkey solution, as tempting as that might be. (Hey, it's fun!)

First, it might be noted that this might be a "linear programming" problem. With the proper LP model (set of formulas to minimize and maximize), it might be possible to use the Solver Simplex LP method to find a solution. (Then again, maybe not. I haven't looked at the details.)

(PS.... Just saw Eric's response, and on second thought, I think his suggestion of simply using the "min value" option and GRG Nonlinear method in Solver should be sufficient, since you have only one variable to minimize. Be that as it may....)

However, the assignment specifically asks that you to use simulation. If you google "excel simulation" without quotes, possibly adding the words "monte carlo", you might find some useful examples.

Generally, one approach would be as follows.

1. Use RANDBETWEEN to choose zero or more of each model to manufacture in-house, subject to the constraints of 10,000 total manufacturing hours, 5,000 total testing hours, and the number ordered of each model, namely 3000, 2000 and 900. Call those random numbers M1, M2 and M3.

2. Then the number to subcontract out is 3000-M1, 2000-M2 and 900-M3. Call those numbers S1, S2 and S3. Apparently, there are no constraints on manufacturing and testing hours that are subcontracted out ("any portion of the order").

3. Then the total in-house cost might be written SUMPRODUCT(M1:M2,{50,83,130}). And the total subcontracted cost might be written SUMPRODUCT(S1:S3,{60,97,145}). The sum of the SUMPRODUCTs is the total cost. (Implementation note: It would be better to put the costs into cell ranges instead of using array constants.)

"Repeat" steps #1-3, keeping track of M1:M3 and S1:S3 that results in smallest total cost (#3).

The first question is: how many "repeats" are necessary?

There is a statistical method to bootstrap such a number; that is, to determine when you have repeated "enough times". But generally, 250, 500, 1000, etc are typical numbers that people use arbitrarily. In part, it depends on how much time and memory it takes.

The second question is: how to implement the "repeats"?

You might write a VBA procedure. But the assignment says "in Excel". Does that mean that you cannot use VBA? Only you know the answer.

One way to implement the "repeats" in Excel without relying on VBA is to set up a row of the calculations in steps #1-3. "Repeat" the calculations in, say, 250 rows total. (Since we use RANDBETWEEN, each row will be different, probably.) Then use MIN, INDEX and MATCH or VLOOKUP to determine the "best" solution; that is, the values of M1:M3 and S1:S3 in the row that has the least total cost.

Obviously, I have not implemented and tested this approach myself. I might have overlooked some details. But I don't think so.

Does that help?