|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub test()
Dim arr, brr(1 To 10000, 1 To 6)
r = Sheets(1).[b65536].End(xlUp).Row
arr = Sheets(1).Range("a3:co" & r)
For x = 4 To UBound(arr)
For y = 5 To UBound(arr, 2)
If InStr(arr(1, y), "店铺") Then
If arr(x, y) > 0 Then
n = n + 1
brr(n, 1) = "'" & arr(x, 2)
brr(n, 2) = arr(x, 3)
brr(n, 3) = arr(x, 4)
brr(n, 4) = arr(x, 5)
brr(n, 5) = arr(3, y)
brr(n, 6) = arr(x, y)
End If
End If
Next
Next
Sheets(2).[a2].Resize(n, 6) = brr
Beep
End Sub
|
|