|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Target.Column = 10 And Target.Row >= 718 And _
Target.Row <= 801) Then Exit Sub
Dim t, arr, i, j, n, s
arr = [j718:j801]: ReDim brr(1 To UBound(arr, 1), 1 To 5)
For i = 1 To UBound(arr, 1)
t = Trim(arr(i, 1))
If Len(t) > 0 Then
For j = 1 To Len(t)
If Not IsNumeric(Mid(t, j, 1)) Then Mid(t, j, 1) = Space(1)
Next
t = Split(t): n = 0
For j = 0 To UBound(t)
If Len(t(j)) > 0 Then
n = n + 1
brr(i, n) = Val(t(j))
End If
Next
End If
Next
[c718].Resize(UBound(brr, 1), UBound(brr, 2)) = brr
arr = Range("c2:g" & Cells(Rows.Count, "c").End(xlUp).Row)
If UBound(arr, 1) < 716 Then Columns(13).Resize(, 5).ClearContents: Exit Sub
n = 0
For i = UBound(arr, 1) - 715 To UBound(arr, 1)
n = n + 1
For j = 1 To UBound(arr, 2)
arr(n, j) = arr(i, j)
Next j, i
With [m2]
.Resize(Rows.Count - 1, UBound(arr, 2)).ClearContents
.Resize(716, UBound(arr, 2)) = arr
End With
End Sub |
评分
-
1
查看全部评分
-
|