- ©«¤l
- 234
- ¥DÃD
- 19
- ºëµØ
- 0
- ¿n¤À
- 276
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows XP
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-7
- ³Ì«áµn¿ý
- 2021-10-7
|
¦^´_ 1# mdr0465
¦]¬°¸ê®ÆªºÄæ¦ì¤£¤@P,¥u¯à¥Î¤ñ¹ïªº
Sub ex()
Dim arr As Variant
Dim x%, y%, b%, a As Object
ReDim arr(Sheets.Count - 2, Sheets("summary").[a1].End(2).Column)
For x = 2 To Sheets.Count
arr(x - 2, 0) = x - 1
arr(x - 2, 1) = Sheets(x).Name
For Each a In Sheets("SUMMARY").Range([c1], [c1].End(2))
For b = 1 To 3 Step 2
For y = 1 To Sheets(x).Cells(65535, b).End(3).Row
If Left(Sheets(x).Cells(y, b), Len(a)) = a Then
arr(x - 2, a.Column - 1) = Sheets(x).Cells(y, b).Offset(, 1).Value
GoTo line1
End If
Next
Next
line1:
Next
Next
Sheets("SUMMARY").[a2].Resize(UBound(arr) + 1, UBound(arr, 2)) = arr
End Sub |
|