´ú¸ÕÀÉ¡J
¦Û°Ê¶}±Ò¦P¸ê®Æ§¨ªº¦UÀɮ׶ñ¤J¸ê®ÆÈ.rar (28.18 KB)
½Ð×¥¿¤U¦Cªºµ{¦¡½X¡A¥H§Q¯à¥¿½T°õ¦æ¡CÁÂÁ¡I
Sub Ex()
Dim Path As String, A As String
Path = ThisWorkbook.Path
A = Dir(Path & "\*.xls")
Do While A <> ""
With Workbooks.Open(Path & "\" & A)
Application.ScreenUpdating = False
'¶ñ¤JAQ1:BJ21ªºÈ
[AQ1].FormulaArray = "=IF(COLUMN(A1)>39-COUNT($B1:$AN1),"""",SMALL(IF(ISNA(MATCH(ROW($1:$39),$B1:$AN1,0)),ROW($1:$39)),COLUMN(A1)))"
[AQ1].Copy [AR1:BJ1]
[AQ1:BJ1].Copy [AQ2:BJ21]
[AQ1:BJ21] = [AQ1:BJ21].Value 'ÂàÈ
.Close True
End With
A = Dir
Loop
End Sub |