- ©«¤l
- 163
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 170
- ÂI¦W
- 0
- §@·~¨t²Î
- Window 7
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-9-5
- ³Ì«áµn¿ý
- 2022-7-20
|
¦^´_ 1# iceandy6150
½Ð°Ñ¦Ò- Private Sub CommandButton1_Click()
- Dim arr
- Dim brr()
- Dim d As Object
- Set d = CreateObject("Scripting.Dictionary")
- Application.ScreenUpdating = False
- ar = Array("¸ê®Æ.xlsx", "¤Ø¤o.xlsx")
- For Each book In ar
- Workbooks.Open ThisWorkbook.Path & "\" & book
- arr = ActiveSheet.[A1].CurrentRegion
- ActiveWorkbook.Close 0
- For i = 2 To UBound(arr)
- For j = 2 To UBound(arr, 2)
- d(arr(i, 1) & arr(1, j)) = arr(i, j)
- Next j
- Next i
- Next book
- arr = ActiveSheet.[A1].CurrentRegion
- ReDim brr(1 To UBound(arr) - 1, 1 To UBound(arr, 2) - 1)
- For i = 2 To UBound(arr)
- For j = 2 To UBound(arr, 2)
- brr(i - 1, j - 1) = d(arr(i, 1) & arr(1, j))
- Next j
- Next i
- [B2].Resize(UBound(brr), UBound(brr, 2)) = brr
- Application.ScreenUpdating = True
- Erase brr
- Set d = Nothing
- arr = ""
- End Sub
½Æ»s¥N½X ª`·N¡G¥»µ{¦¡·|¦Û°Ê¶}±Ò¨âÓ¸ê®ÆÀɨӤñ¹ï¡A¦]¦¹°õ¦æ«e¤£»Ý¥ý¶}±Ò¸ê®ÆÀɮסC |
|