- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 255
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-25
|
¦^´_ 1# cdkee
¸ê®ÆÂл\- Sub Ex()
- Dim A As Range, Rng As Range, Ar(), t As Date
- fs = ThisWorkbook.Path & "\TEST.xlsx" 'n³B²zªºÀÉ®×
- With Workbooks.Open(fs)
- With .Sheets(1)
- For Each A In .Range(.[B1], .[B1].End(xlDown))
- If Format(A, "hh:mm:ss") = "09:16:00" Or Format(A, "hh:mm:ss") = "13:31:00" Then
- k = A.Offset(, 1): t = CDate(Format(A, "hh:mm:ss")) - TimeValue("00:02:00")
- For i = 1 To 2
- ReDim Preserve Ar(s)
- X = Format(t, "h:mm:ss0")
- Ar(s) = Array(A.Offset(, -1), X, k, k, k, k, "")
- s = s + 1
- t = t + TimeValue("00:01:00")
- Next
- End If
- ReDim Preserve Ar(s)
- Ar(s) = Array(A.Offset(, -1).Value, A.Value, A.Offset(, 1).Value, A.Offset(, 2).Value, A.Offset(, 3).Value, A.Offset(, 4).Value, A.Offset(, 5).Value)
- s = s + 1
- Next
- .[A1].Resize(s, 7) = Application.Transpose(Application.Transpose(Ar))
- End With
- .Save '¦sÀÉ
- End With
- End Sub
½Æ»s¥N½X |
|