だから私は非常に単純な目的を任されていると思っていましたが、私はそれに苦労していることがわかりました.
実行したい非常に単純なコードがあり、 is numeric 関数の背後にある考え方は、数値ではないセルをスキップし、数値のみを計算に入れることを意味します。すごい。ただし、Length Variable を 1 ずつ拡張して、空白ごとに余分な数値を追加して、Length の真の値を同じに保つようにしたかったのです。
しかし、私はこれを機能させることができません。私の isnumeric 関数は何もしないようです。
誰か助けてくれませんか?
Function RSE(MyCells As Range, Length As Double)
Dim up_day, down_day, ups, downs
Dim average_up, average_down
Dim rs, cellcount, rangecount As Long
Dim cll As Range
ups = 0
up_day = 0
downs = 0
down_day = 0
cellcount = 0
rangecount = 0
For Each cll In MyCells
If IsNumeric(cll) Then
cellcount = cellcount + 1
If cellcount = Length Then Exit For
If cll.Value >= cll.Offset(1, 0).Value Then
downs = downs + cll - cll.Offset(1, 0).Value
ElseIf cll.Value < cll.Offset(1, 0).Value Then
ups = ups + cll.Offset(1, 0).Value - cll.Value
End If
Else:
Length = Length + 1
End If
Next cll
average_up = ups / Length
average_down = downs / Length
rs = average_up / average_down
RSE = 100 - (100 / (1 + rs))
End Function