|
请参考
Dim n, r As Long, myr
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Target.Row < 8 Or Target.Row > 32 Then Exit Sub
myr = Target.Row
If Target.Column = 6 Or Target.Column = 7 Then
n = 8: x1 = Cells(myr, 6) * Cells(myr, 7): fl x1
xx1 = Cells(myr, 30) * Cells(myr, 31)
jine xx1
ElseIf Target.Column = 18 Or Target.Column = 19 Then
n = 20: x2 = Cells(myr, 18) * Cells(myr, 19): fl x2
xx2 = Cells(myr, 30) * Cells(myr, 31)
jine xx2
End If
End Sub
Public Sub fl(x)
If x = 0 Then Exit Sub
Dim ar(1 To 11)
x = Round(x * 100)
For i = 1 To 10
ar(11 - i) = Left(Right(" " & x, i), 1)
Next
Cells(myr, n).Resize(, 10) = ar
End Sub
Public Sub jine(xx)
If xx = 0 Then Exit Sub
Dim ar(1 To 11)
xx = Round(xx * 100)
For i = 1 To 10
ar(11 - i) = Left(Right(" " & xx, i), 1)
Next
Cells(myr, 32).Resize(, 10) = ar
End Sub
|
评分
-
3
查看全部评分
-
|