- ©«¤l
- 36
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 93
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2018-2-27
- ³Ì«áµn¿ý
- 2022-2-25
|
¦U¦ì¦n¡A¦³Ó°ÝÃD³Â·Ð¦U¦ìÀ°¦£¸Ñµª
¥Ø«e¨âÓEXCELÀÉ¡A¤@ӥΨӧ@¥X¶Ôµn°O¡A¤@Ó¥X¶Ô²Îp¥Î
²Îpªº³¡¤À¬O¨Ì·Ó©Ò»Ýnªº¤é´Á°Ï¶¡°µ§ì¨ú¸ê®Æ¡A¦ý¦]¬°µn°Oªº³¡¤À¦h¼W¥[¤FÀx¦s®æÃC¦â¨Ó³Æµù¡A
§Æ±æ§ì¨ì²Îp¨ºÃä®ÉÀx¦s®æÃC¦â¤]¯à¤@¨Ö¹L¥h- Sub Main()
- Call ¤é´Á°Ï¶¡(S, E)
- Call ¥[¸É¥ð(S, E)
- Call ¥[¯Z¶O(S, E)
-
- End Sub
- Sub ¤é´Á°Ï¶¡(S, E)
-
- S = CDate(Sheets("³]©w¶").Range("b8"))
- E = CDate(Sheets("³]©w¶").Range("c8"))
-
- End Sub
- Sub ¥[¸É¥ð(S, E)
- 'Call «Ø¥ß·s¤u§@ªí(S, E)
- i = 3
- x = 2
-
- If Sheets(1).Cells(2, 1) = "" Then
- x = 2
- Else
- x = ActiveSheet.UsedRange.Rows.Count + 1
- ' MsgBox x
- End If
-
- SNAME = Sheets("³]©w¶").Range("B2") '¬¡¶Ã¯¦WºÙ
- Do While Workbooks(SNAME).Sheets("¸É¥ð").Cells(i, 1) <> ""
- 'MsgBox S
- If (Workbooks(SNAME).Sheets("¸É¥ð").Cells(i, 4) >= CDate(S) And Workbooks(SNAME).Sheets("¸É¥ð").Cells(i, 4) <= CDate(E)) = True Then
- '«Ø¥ß·s¤u§@ªí
-
- Sheets(1).Cells(x, 1) = Workbooks(SNAME).Sheets("¸É¥ð").Cells(i, 1)
- Sheets(1).Cells(x, 2) = Workbooks(SNAME).Sheets("¸É¥ð").Cells(i, 2)
- Sheets(1).Cells(x, 3) = Workbooks(SNAME).Sheets("¸É¥ð").Cells(i, 12)
- Sheets(1).Cells(x, 4) = CDate(Workbooks(SNAME).Sheets("¸É¥ð").Cells(i, 4))
- Sheets(1).Cells(x, 8) = Workbooks(SNAME).Sheets("¸É¥ð").Cells(i, 5)
- x = x + 1
- End If
- i = i + 1
- Loop
- End Sub
- Sub ¥[¯Z¶O(S, E)
- 'Call «Ø¥ß·s¤u§@ªí(S, E)
- i = 3
- x = 2
-
- If Sheets(1).Cells(2, 1) = "" Then
- x = 2
- Else
- x = ActiveSheet.UsedRange.Rows.Count + 1
- 'MsgBox x
- End If
-
- SNAME = Sheets("³]©w¶").Range("B2") '¬¡¶Ã¯¦WºÙ
- Do While Workbooks(SNAME).Sheets("¥[¯Z¤Î½Ð°²").Cells(i, 1) <> ""
- If Workbooks(SNAME).Sheets("¥[¯Z¤Î½Ð°²").Cells(i, 3) <> "" And Workbooks(SNAME).Sheets("¥[¯Z¤Î½Ð°²").Cells(i, 4) <> "" = True Then
-
- Sheets(1).Cells(x, 1) = Workbooks(SNAME).Sheets("¥[¯Z¤Î½Ð°²").Cells(i, 2)
- Sheets(1).Cells(x, 2) = Workbooks(SNAME).Sheets("¥[¯Z¤Î½Ð°²").Cells(i, 3)
- Sheets(1).Cells(x, 3) = Workbooks(SNAME).Sheets("¥[¯Z¤Î½Ð°²").Cells(i, 1)
- Sheets(1).Cells(x, 4) = CDate(Workbooks(SNAME).Sheets("¥[¯Z¤Î½Ð°²").Cells(i, 4))
- Sheets(1).Cells(x, 5) = Workbooks(SNAME).Sheets("¥[¯Z¤Î½Ð°²").Cells(i, 5)
- Sheets(1).Cells(x, 6) = Workbooks(SNAME).Sheets("¥[¯Z¤Î½Ð°²").Cells(i, 6)
- Sheets(1).Cells(x, 7) = Workbooks(SNAME).Sheets("¥[¯Z¤Î½Ð°²").Cells(i, 7)
- x = x + 1
- End If
- i = i + 1
- Loop
- End Sub
½Æ»s¥N½X |
|