ALT+F 1 1, open the VBA editor, insert the module, copy and paste the following code, and F5 runs it. The result is shown in A1-A16.
Tj ()
I, j, x, y are represented as bytes.
Mark a, b, c, d, e and f as single.
Range ("k:p"). clear
For i = 2 to 8
x = 0
y = 0
For j = 3 to 10
if Int(j/2)& lt; J)& lt;/2 and cell (i, j) < & gt ""So
x = x + 1
other
If Int(j/2) = j/2 and Cells(i, j) <; & gt ""So
y = y + 1
If ... it will be over.
If ... it will be over.
then
If x = 0 and y = 0, then
Cells(i,Asc(Cells(i,2)) - 54) = 1
If ... it will be over.
If x = 1 and y = 0, then
Cell (I, Asc (cell (I, 2))-54) = 0.5
For j = 3 to 10
if Int(j/2)& lt; J)& lt;/2 and cell (i, j) < & gt ""So
Cells(i,Asc(Cells(i,j)) - 54) = Cells(i,Asc(Cells(i,j)) - 54) + 0.5
If ... it will be over.
then
If ... it will be over.
If x> 1, then y = 0.
Cell (I, Asc (cell (I, 2))-54) = 0.3
For j = 3 to 10
if Int(j/2)& lt; J)& lt;/2 and cell (i, j) < & gt ""So
Cells(i,Asc(Cells(i,j)) - 54) = Cells(i,Asc(Cells(i,j)) - 54) + 0.7 / x
If ... it will be over.
then
If ... it will be over.
If x = 0 and y>= 1 then
Cell (I, Asc (cell (I, 2))-54) = 0.6
For j = 3 to 10
If Int(j/2) = j/2 and Cells(i, j) <; & gt ""So
Cells(i,Asc(Cells(i,j)) - 54) = Cells(i,Asc(Cells(i,j)) - 54) + 0.4 / y
If ... it will be over.
then
If ... it will be over.
If x = 1 and y>= 1 then
Cell (I, Asc (cell (I, 2))-54) = 0.3
For j = 3 to 10
if Int(j/2)& lt; J)& lt;/2 and cell (i, j) < & gt ""So
Cells(i,Asc(Cells(i,j)) - 54) = Cells(i,Asc(Cells(i,j)) - 54) + 0.6
other
If Int(j/2) = j/2 and Cells(i, j) <; & gt ""So
Cells(i,Asc(Cells(i,j)) - 54) = Cells(i,Asc(Cells(i,j)) - 54) + 0. 1 / y
If ... it will be over.
If ... it will be over.
then
If ... it will be over.
If x> 1 and y>, then 1
Cell (I, Asc (cell (I, 2))-54) = 0.2
For j = 3 to 10
if Int(j/2)& lt; J)& lt;/2 and cell (i, j) < & gt ""So
Cells(i,Asc(Cells(i,j)) - 54) = Cells(i,Asc(Cells(i,j)) - 54) + 0.7 / x
other
If Int(j/2) = j/2 and Cells(i, j) <; & gt ""So
Cells(i,Asc(Cells(i,j)) - 54) = Cells(i,Asc(Cells(i,j)) - 54) + 0. 1 / y
If ... it will be over.
If ... it will be over.
then
If ... it will be over.
then
A = application. WorksheetFunction.Sum (range ("k:k"))
B = application. Worksheet Function.Sum (range ("l:l"))
C = application. WorksheetFunction.Sum (range ("m:m"))
D = application. Worksheet Function.Sum (range ("n:n"))
E = application. Worksheet Function.Sum (range ("o:o"))
F = application. WorksheetFunction.Sum (range ("p:p"))
Range ("k:p"). clear
Cells( 1 1, 1)= " A = " & amp; Format (a, "0.00")
Cells( 12, 1)= " B = " & amp; Format (b, "0.00")
Cells( 13, 1)= " C = " & amp; Format (c, "0.00")
Cells( 14, 1)= " D = " & amp; Format (d, "0.00")
Cells( 15, 1)= " E = " & amp; Format (for example, "0.00")
Cells( 16, 1)= " F = " & amp; Format (f, "0.00")
End joint