Hi, Kevin2 did a great job in helping create a javascript structure from which I could edit and do my own data entry to, I have that nearly complete now I am face with another problem.

I need to create a new script that has drop down options and some user input.

Here is an image of my end goal.

http://imageshack.com/a/img513/3259/r60k.jpg

Ok now an explantation to how it works.

The first column has the drop downs the options are name 1 & 2. The columns named '#' & 'S' are to be filled out by the user. The column named 'T' calculates the total of #+S and then the 2 output boxes are autofilled from a list of numbers that correspond to whatever the total is.

If the user selects dropdown 1 here is what could be filled into #&S from the user:

# S
1 31 7
2 10 15
3 13 13
4 15 12
5 12 7
6 3 9
7 5 5
8 1 3
9 7 4
10 2 4
11 0 1
12 0 1
13 0 1
14 1 0
15 0 0
16 0 0
17 0 0

If the user selects dropdown 2 here is what could be filled into #&S from the user:

# S
1 19 9
2 19 8
3 15 6
4 3 17
5 9 6
6 11 5
7 8 5
8 2 2
9 5 2
10 4 2
11 1 1
12 1 2
13 0 1
14 0 1
15 1 0
16 0 1
17 0 1


Ok so now that you know what the user can enter into boxes named '#' & 'S' and through selection of either dropdown 1 or 2 its time to calculate the next column which is Total. This column should simple be the #+S added together.

Next is the Output columns. Column one is described as if the total is a certain number then the output should autofill it with a number.

Here is a list of totals and what their outcome should be.

Total Equals Outcome Is
1 0
2 1
3 3
4 1
5 2
6 1
7 1
8 10
9 7
10 9
11 6
12 4
13 5
14 3
15 4
16 3
17 7
18 3
19 14
20 7
21 13
22 6
23 3
24 9
25 14
26 4
27 8
28 7
29 0
30 0
31 1
32 1
33 0
34 0
35 1
36 8
37 0
38 5
39 0
40 0
41 0
42 0
43 4
44 2
45 0
46 1

The last column of the outcomes box is autofilled or calculated in order of the outcome, so for example lets say there are 5 outcomes of which are 8,9,9,12,14

It should be ordered highest to lowest so:

14-1
12-2
9-3
9-3
8-4

And thats all there is to it. Hope someone can help with this once again seems simple enough just hard to get my head around.