|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub tet()
Dim arr
Dim k, x, y, i As Integer
Dim brr()
arr = Range("a1").CurrentRegion
k = Range("a65536").End(xlUp).Row
ReDim brr(1 To k, 1 To UBound(arr, 2))
For x = 5 To k
If arr(x, 11) = 15 Or arr(x, 11) = 16 Then
For y = 1 To UBound(arr, 2)
arr(x, y) = ""
Next y
End If
Next x
Stop
For x = 5 To k
Do While arr(x, 1) = ""
x = x + 1
Loop
i = i + 1
For y = 1 To UBound(arr, 2)
brr(i, y) = arr(x, y)
Next y
Next x
Range("a4:k" & k) = ""
Sheet1.Range("a4").Resize(UBound(brr), 11) = brr
End Sub
|
|