- ©«¤l
- 87
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 122
- ÂI¦W
- 0
- §@·~¨t²Î
- win 7
- ³nÅ骩¥»
- 2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-7-9
- ³Ì«áµn¿ý
- 2018-1-16
|
¥»©«³Ì«á¥Ñ play9091 ©ó 2012-5-13 21:58 ½s¿è
¦^´_ 3# luke
¸Õ¸Õ¬Ý³o¼Ë¤l¥i¤£¥i¥H§a¡I§Ú¤£ª¾¹D¦bª«¥ó¸Ì±¥i¤£¥i¥H©ñarr()¡A¤£¦æªº¸Ü¦A§â¥¦®³¥X¨Ó¦n¤F¡I¥ý¸Õ¸Õ¬Ý³o¼Ë¤l¡I- Sub CC()
- Dim arr1, arr2, arr3, arr4
- arr1 = Array("D:\TEST\TEST20\TT.txt", "D:\TEST\TEST20\TEST\TT.txt", "D:\TEST\TEST20\UU.csv")
- arr2 = Array("TT", "TT", "UU")
- arr3 = Array("A:B", "G:H", "C")
- arr4 = Array("A:B", "A:B", "A")
- Set fd = CreateObject("Scripting.FileSystemObject")
- Application.ScreenUpdating = False
- For I = 1 To 3
- Set FT = ActiveWorkbook
- FS = arr1(I)
- With Workbooks.Open(FS).Sheets(arr2(I))
- FT.Sheets("Sheet2").Columns(arr3(I)) = .Columns(arr4(I)).Value
- .Parent.Close False
- End With
- Next I
- End Sub
- Sub DD()
- Dim arr1, arr2, arr3, arr4
- arr1 = Array("D:\TEST\TEST20\TT.txt", "D:\TEST\TEST20\TEST\TT.txt", "D:\TEST\TEST20\UU.csv")
- arr2 = Array("TT", "TT", "UU")
- arr3 = Array("D:E", "G:H", "F")
- arr4 = Array("A:B", "A:B", "A")
- Application.ScreenUpdating = False
- Set FT = ActiveWorkbook
- For I = 1 To 3
- Set FT = ActiveWorkbook
- FS = arr1(I)
- With Workbooks.Open(FS).Sheets(arr2(I))
- FT.Sheets("Sheet2").Columns(arr3(I)) = .Columns(arr4(I)).Value
- .Parent.Close False
- End With
- Next I
- sheet2.[f1:f5] = [c1:c5].Value
- Range("F6").FormulaR1C1 = "=""Count=""&COUNT(R[-5]C[-2]:RC[-2])"
- Range("F7").FormulaR1C1 = "=""Lan""&R[-6]C[-2]&""=""&R[-6]C[-1]"
- Range("F7").Copy Range("F8:F9")
- Range("F6:F9").Copy
- Selection.PasteSpecial Paste:=xlPasteValues
- End Sub
½Æ»s¥N½X |
|