Sub kkkk()
arr = Range("a1:z100") '取单元格数据到数组
k = UBound(arr) '数组行下标
h = UBound(arr, 2) '数组列下标
ReDim brr(1 To k, 1 To h) '根据源数据声明一个相同大小的数组保存新结果
a = 0 '初始化结果数组行变量
For x = 1 To k
If arr(x, 1) <> "要删除" Then
a = a + 1
For y = 1 To h
brr(a, y) = arr(x, y)
End If
Range("a1:z100") = brr
End Sub
Sub kkkk()
k = Cells(Rows.Count, 1).End(3).Row
t = ""
For x = 1 To k
If Cells(x, 1) = "B" Then
If t = "" Then
t = x & ":" & x
t = t & "," & x & ":" & x
End If
End If