|
▼Upa さん:
試してみて!
Sub LV6()
Dim i As Long
Dim j As Long
Dim ary As Variant
ary = Array("+", "-", "X")
Cells.Clear
For i = 1 To 100
Randomize
For j = 1 To 19 Step 2
Cells(i, j).Value = Int(10 * Rnd)
Next
For j = 2 To 18 Step 2
Cells(i, j).Value = ary(Int(3 * Rnd))
Next
Next i
Call AN3
End Sub
Sub AN3()
Dim strS As String
Dim j As Long
Dim i As Long
Columns("T").Clear
For i = 1 To 100
strS = ""
For j = 1 To 19
strS = strS & Cells(i, j)
Next
strS = Replace(strS, "X", "*")
Cells(i, 20).Value = Application.Evaluate(strS)
Next i
End Sub
|
|