Countdown (Excel)

This version of Countdown’s Numbers Game from Channel 4, was created in Excel and VBA.
(Download Here – “Countdown7.xlsm“)

Instructions

Excel will initially warn you that Macros have been disabled – You will need to “Enable content” (It is perfectly safe to do this).

Enter how many “Large Numbers” you want (0-4 is the valid range). There are four numbers in the large set { 25 , 50 , 75 , 100 }

There are twenty numbers in the small set, two each of the numbers 1-10
{ 1 , 1 , 2 , 2 , 3 , 3 , 4 , 4 , 5 , 5 , 6 , 6 , 7 , 7 , 8 , 8 , 9 , 9 , 10 , 10 }

The script will automatically adjust how many small numbers there will be (A total of six numbers need to be selected therefore – “2 large = 4 small”).

Clicking “Select Numbers” will display your random numbers based on your previous choice.

Next click on the “Get Target” to display the target figure (in the range 100 – 999).

Finally Start the number crunching by clicking on “Calculate Answer”.

The code will work out ALL possible solutions to give the “Target Number” based on the addition, subtraction, multiplication and/or division of the six numbers given. You do not need to use all the numbers nor do you need to use all of the operators.

Concatenation of the digits is not allowed (You can’t use a “2” and “2” to make “22”).

At no intermediate step in the process can the current running total become negative or involve a fraction.

Each numbered tile can only be used once in the calculation.
The total amount of possible solutions is displayed and also the time it took to find each solution.

When all possible solutions have been found the code displays that it has finished along with the total time taken.

Clicking “Reset” will clear all cells ready for the next round.

The Excel cells have NOT been protected and could easily be overwritten so be careful not to break the game by editing any formula or code.

Please feel free to examine my code and any suggestions for tweaks and improvements, would be welcome.

Can you beat the clock?