|
どうしてもマクロなら、
こんな感じかな?
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If IsEmpty(.Value) Then Exit Sub
If .Count > 1 Then Exit Sub
If Application.Intersect(Target, Range("B:B,E:E,H:H")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Select Case .Column
Case 2
.Offset(, 1).Value = Round(.Offset(, -1).Value - .Value, 2)
Case 5
.Offset(, 1).Value = Round(.Offset(, -1).Value * .Value, 2)
Case 8
.Offset(, 1).Value = Round(.Offset(, -1).Value / .Value, 2)
End Select
Application.EnableEvents = True
End With
End Sub
|
|