|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub joy20240902ss()
- Dim arr, brr, ra%, rb%, cb%, i%, j%, AL%
- On Error Resume Next
- Application.ScreenUpdating = False
- ra = Cells(Rows.Count, 140).End(3).Row
- cb = Cells(1, 267).End(2).Column - 267 + 1
- arr = [EJ1].Resize(ra, 126)
- brr = [JG1].Resize(ra, cb)
- For i = 6 To ra
- For j = 1 To cb
- AL = Int((j - 1) / 10 + 1)
- If i < brr(3, j) + 2 Then GoTo 100
- If arr(i, AL) = brr(2, j) And arr(i, AL) = arr(i - brr(3, j) - 1, AL) Then brr(i, j) = 11
- Next
- 100:
- Next
- [JG1].Resize(ra, cb) = brr
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|