|
- Sub tjcj()
- Dim arr, i%, k%, kk%, brr()
- t = Timer
- Application.ScreenUpdating = False
- nRow = Sheets("sheet1").Range("a" & Rows.Count).End(3).Row
- For kk = 1 To nRow Step 9
- With Sheets("sheet1")
- arr = .Range("a" & kk).Resize(9, 4)
- nArr = UBound(arr)
- ReDim brr(1 To 20, 1 To 2)
- For i = 1 To nArr
- brr(i, 1) = arr(i, 1)
- brr(i, 2) = arr(i, 2)
- Next i
-
- For i = nArr + 1 To 2 * nArr
- brr(i, 1) = arr(i - nArr, 3)
- brr(i, 2) = arr(i - nArr, 4)
-
- Next i
- End With
-
- With Sheets("sheet2")
- nrow1 = Range("a" & Rows.Count).End(3).Row + 1
- For i = 1 To UBound(brr)
- For j = 1 To UBound(brr)
- If Cells(1, i) = brr(j, 1) Then Cells(nrow1, i) = brr(j, 2)
- Next j
- Next i
- End With
- Next kk
- Application.ScreenUpdating = True
- MsgBox "本程序运行时间" & Format(Timer - t, "0.000")
- End Sub
复制代码
|
评分
-
2
查看全部评分
-
|