|
こーいうことかな ?
Dim Num As Long
With ActiveCell
If .Row = 1 Then Exit Sub
If Not IsNumeric(.Value) Then Exit Sub
With .End(xlUp)
If Not IsNumeric(.Value) Then Exit Sub
Num = .Value
End With
.Value = .Value + Num
End With
いちおう、数値を入力した瞬間に自動的に計算した値を表示するとして・・
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Num As Long
With Target
If .Row = 1 Then Exit Sub
If .Count > 1 Then Exit Sub
If IsEmpty(.Value) Then Exit Sub
If Not IsNumeric(.Value) Then Exit Sub
With .End(xlUp)
If Not IsNumeric(.Value) Then Exit Sub
Num = .Value
End With
Application.EnableEvents = False
.Value = .Value + Num
End With
Application.EnableEvents = True
End Sub
|
|