|
参与一下。。。- Sub test2()
- Dim Myr, i, j, s, k, t
- Dim arr, Str3$
- Dim d As Object
- Set d = CreateObject("scripting.dictionary")
- Application.ScreenUpdating = False
- With Sheet1
- Myr = .Range("a65536").End(xlUp).Row
- arr = .Range("a2:b" & Myr)
- End With
- For i = 1 To UBound(arr)
- s = Minute(arr(i, 2))
- If Not d.exists(s) Then Set d(s) = CreateObject("Scripting.Dictionary")
- d(s)(i) = i
- Next
- k = d.keys
- Str3 = "[COM]"
- For x = 0 To UBound(k) Step 2
- For Each kk In d(k(x)).keys
- Str3 = Str3 & Chr(10) & Format(arr(kk, 1), "000000") & "=7"
- Next
- Next
- Open ThisWorkbook.Path & "\测试.txt" For Output As #1
- Print #1, Str3
- Close #1
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
2
查看全部评分
-
|