- ©«¤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-12-18
|
¥»©«³Ì«á¥Ñ samwang ©ó 2021-6-4 19:48 ½s¿è
¦^´_ 1# BV7BW
½Ð´ú¸Õ¬Ý¬Ý¡A¤£ª¾¬O§_¬°±zªº»Ý¨D¡AÁÂÁ¡C
Sub ¬£¨®ªí_¿é¤J1()
Dim DD, CC$, Arr, Brr, i&, j%, N&, xD
Call ¬£¨®ªí_²M°£
DD = [D1]: CC = [B1]
If Not IsDate(DD) Then MsgBox "**½Ð¿é¤J¤é´Á!! ": Exit Sub
If CC = "" Then MsgBox "**½Ð¿é¤J[¨®½s]!! ": Exit Sub
Set xD = CreateObject("Scripting.Dictionary")
Arr = Range([¤u§@ªí2!L1], [¤u§@ªí2!A65536].End(xlUp))
ReDim Brr(1 To UBound(Arr), 1 To 4)
For i = 2 To UBound(Arr)
If Arr(i, 12) <> DD Or Arr(i, 10) <> CC Then GoTo 101
PNo = Arr(i, 11): If xD(PNo) = 1 Then GoTo 101
xD(PNo) = 1: N = N + 1
If InStr(Arr(i, 2), "A") Then
Brr(N, 2) = Format(Right(Arr(i, 2), 2), "00")
Else
Brr(N, 2) = Format(Mid(Right(Arr(i, 2), 3), 1, 2), "00")
End If
Brr(N, 1) = Arr(i, 1)
Brr(N, 3) = Arr(i, 2)
Brr(N, 4) = Arr(i, 11)
101: Next i
If N = 0 Then MsgBox "**¨S¦³²Å¦Xªº¸ê®Æ!! ": Exit Sub
With Sheets("¤u§@ªí1")
.[A3].Resize(N, UBound(Brr, 2)) = Brr
.Range("A1:G" & N + 3).Name = "'" & .Name & "'!Print_Area"
.Range("1:3").Name = "'" & .Name & "'!Print_Titles"
End With
End Sub |
|