- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 8# PJChen
¦p¦óÅý©Ò¦³"V"
³sÄò°µ®Mªí°Ê§@,ª½¨ì§¹¦¨¡H
>> ½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, Brr, i&, C%
Tm = Timer
Application.DisplayAlerts = False
Brr = Sheets("»¡©ú").[j1].CurrentRegion
Arr = Range([¹w¬ù!o1], [¹w¬ù!a65536].End(3))
With Sheets("¶ìªO")
.[c17] = "": .[e22] = "": .[c28] = ""
.[c16] = "": .[c26] = "": .[c27] = ""
End With
For i = 2 To UBound(Arr)
If UCase(Arr(i, 15)) = "V" Then
With Sheets("¶ìªO")
.[c17] = Arr(i, 1): .[e22] = Arr(i, 3): .[c28] = Date 'Arr(i, 1)=¤é´Á,Arr(i, 3)=¼Æ¶q
For j = 2 To UBound(Brr, 2)
If Arr(i, 2) = Brr(1, j) Then
.[c16] = Brr(2, j): .[c26] = Brr(3, j): .[c27] = Brr(4, j)
End If
Next
End With
Sheets("¶ìªO").Copy
ActiveWorkbook.SaveAs "D:\" & Arr(i, 2) & "-" & Format(Arr(i, 1), "yyyymmdd") & ".xlsx"
ActiveWindow.Close
With Sheets("¶ìªO")
.[c17] = "": .[e22] = "": .[c28] = ""
.[c16] = "": .[c26] = "": .[c27] = ""
End With
End If
Next
MsgBox Timer - Tm
Application.DisplayAlerts = True
End Sub
|
|