- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-27
|
¥»©«³Ì«á¥Ñ ã´£³¡ªL ©ó 2016-4-2 11:13 ½s¿è
²Ä¢´ÂI»Ý¨D¤£¤Ó²M·¡¡A¥ý¸Õ¬Ý¬Ý¡G- Sub ¸ü¤J()
- Dim Arr, xB As Workbook, BKN, i&, N&, xD, U
- Call ²M°£
- Set xD = CreateObject("Scripting.Dictionary") '¦r¨åÀÉ
- Application.ScreenUpdating = False
- Set xB = Workbooks.Open(ThisWorkbook.Path & "\Christy¯]Ä_§ó·s.xls", ReadOnly:=True) '°ßŪ¶}±ÒÀÉ®×
- Arr = Range(xB.Sheets(1).[C1], xB.Sheets(1).Cells(Rows.Count, 2).End(xlUp)) '±N¸ê®Æ½d³ò¯Ç¤J°}¦C
- xB.Close 0 'Ãö³¬ÀÉ®×
- For i = 2 To UBound(Arr)
- If Left(Arr(i, 1), 2) = "FJ" Or Left(Arr(i, 1), 1) = "W" Then 'Àˬd½s¸¹º2©Î1^¤å½X
- N = N + 1 '²Å¦XªÌ²Ö¥[1
- Arr(N, 1) = Left(Arr(i, 1), 6) & "-" & Right(Arr(i, 1), 3) '¼g¤J½s¸¹
- Arr(N, 2) = Arr(i, 2) '¼g¤J¼Æ¶q
- xD(Arr(N, 1)) = Arr(N, 2) '¥H½s¸¹¬°key,±N¼Æ¶q¯Ç¤J¦r¨åÀÉ
- End If
- Next i
- If N > 0 Then Cells(Rows.Count, "H").End(xlUp)(2).Resize(N, 2) = Arr '¸ü¤J°}¦C¤º®e
- For Each BKN In Array("F¯]Ä_¤W¸¨µP", "W¯]Ä_¤W¸¨µP") '³v¤@¶}±Ò¨âÓÀÉ®×
- Set xB = Workbooks.Open(ThisWorkbook.Path & "\" & BKN & ".xls", ReadOnly:=True) '°ßŪ¶}±ÒÀÉ®×
- Arr = xB.Sheets(1).UsedRange '±N¸ê®Æ½d³ò¯Ç¤J°}¦C
- xB.Close 0 'Ãö³¬ÀÉ®×
- N = 0 'p¼Æ¾¹Âk0
- For i = 2 To UBound(Arr)
- If Left(Arr(i, 5), 2) = "FJ" Or Left(Arr(i, 5), 1) = "W" Then 'Àˬd½s¸¹º2©Î1^¤å½X
- N = N + 1 '²Å¦XªÌ²Ö¥[1
- Arr(N, 1) = Left(Arr(i, 5), 6) & "-" & Right(Arr(i, 5), 3) '¼g¤J½s¸¹
- Arr(N, 2) = Arr(i, 12) '¼g¤J[¬O/§_]
- Arr(N, 3) = Val(xD(Arr(N, 1))) '¼g¤J¼Æ¶q(±q¦r¨åÀɤ¤¨ú¥X)
- '¡õ¤W/¤UµPÀˬd
- Arr(N, 4) = ""
- If Arr(N, 2) = "§_" And Arr(N, 3) > 0 Then Arr(N, 4) = "¡¶¤WµP": U = U + 1
- If Arr(N, 2) = "¬O" And Arr(N, 3) = 0 Then Arr(N, 4) = "¡¿¤UµP": U = U + 1
- End If
- Next i
- If N > 0 Then Cells(Rows.Count, "C").End(xlUp)(2).Resize(N, 4) = Arr '¸ü¤J°}¦C¤º®e
- Next
- Application.ScreenUpdating = True
- If U > 0 Then MsgBox "¦@¦³ " & U & " Ó¶µ¥Ø¶·³B²z¡I¡@"
- End Sub
- Sub ²M°£()
- With ActiveSheet
- If .FilterMode Then .ShowAllData
- .UsedRange.Offset(1, 0).EntireRow.Delete
- .[A2].Select
- End With
- End Sub
½Æ»s¥N½X ¡@
¡@
°Ñ¦ÒÀɮסGXLS®æ¦¡¡A½Ð¦Û¦æ¥h®M
FW¯]Ä_¤W¸¨µP¤@Áä.rar (72.71 KB)
¡@
¥t¤@¸üÂI¡G
http://www.funp.net/918457
¡@
¡@ |
|