- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 1# ÅÚ½³ªd
קï¦p¤U¬õ¦r¡AÁÂÁÂ
©Ò¦³Workbooks("SNAME") §ï¬° Workbooks(SNAME)
Sub §¹¦¨_Á`µ²new()
i = 2
If Range("a2") = "" Then
r = 2
Else
r = Range("a1").End(xlDown).Row + 1
End If
FN = Sheets("³]©w¶").Range("B5")
Workbooks.Open Filename:=FN
SNAME = ActiveWorkbook.Name
Do While Range("a" & i) <> ""
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 1) = Workbooks(SNAME).Sheets("Á`ªí").Range("a" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 2) = Workbooks(SNAME).Sheets("Á`ªí").Range("e" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 3) = Workbooks(SNAME).Sheets("Á`ªí").Range("f" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 4) = Workbooks(SNAME).Sheets("Á`ªí").Range("j" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 5) = Workbooks(SNAME).Sheets("Á`ªí").Range("i" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 6) = Workbooks(SNAME).Sheets("Á`ªí").Range("d" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 7) = Workbooks(SNAME).Sheets("Á`ªí").Range("l" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 8) = Workbooks(SNAME).Sheets("Á`ªí").Range("m" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 9) = Workbooks(SNAME).Sheets("Á`ªí").Range("q" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 10) = Workbooks(SNAME).Sheets("Á`ªí").Range("t" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 11) = Workbooks(SNAME).Sheets("Á`ªí").Range("ab" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 12) = Workbooks(SNAME).Sheets("Á`ªí").Range("y" & i)
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 13) = Workbooks(SNAME).Sheets("Á`ªí").Range("z" & i)
' Workbooks("2.¦~«×°V½mpµeªí").Worksheets("³sµ²Á`ªí").Cells(r, 14) = Workbooks("SNAME").Sheets("Á`ªí").Range("aa" & i)
If Workbooks(SNAME).Sheets("Á`ªí").Range("j" & i) = "¥~°V" And Workbooks(SNAME).Sheets("Á`ªí").Range("q" & i) <> "" Then
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 14) = "¸Ô¦p©ú²Ó"
Else
Workbooks("2.¦~«×°V½mpµeªí").Sheets("³sµ²Á`ªí").Cells(r, 14) = Workbooks(SNAME).Sheets("Á`ªí").Range("aa" & i)
End If
r = r + 1
i = i + 1
Loop
Workbooks(SNAME).Close
'x = WorksheetFunction.CountIf(Sheets("³sµ²Á`ªí").Range("c:d"), Range("m:m"))
End Sub |
|