- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 3# Hero2013
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim Ar(), Ay(), Rng As Range, i As Integer, R As Integer
- With Sheets("print")
- For i = .Range("G9").Value To .Range("H9").Value
- With Sheets("Journal")
- Set Rng = .Range("A5", .Range("A5").End(xlDown)).Find(i, LOOKAT:=xlWhole)
- End With
- If Not Rng Is Nothing Then
- Do While Rng = i
- R = R + 1
- With Rng
- ReDim Preserve Ar(1 To R)
- Ar(R) = Array(.Range("B1").Value, .Range("C1").Value, .Range("G1").Value, .Range("H1").Value, .Range("I1").Value)
- End With
- Set Rng = Rng.Offset(1)
- Loop
- Ay = Application.Transpose(Ar)
- R = R + 1
- ReDim Preserve Ar(1 To R)
- Ar(R) = Array("", "", "Á` ¼Æ:", Application.Sum(Application.Index(Ay, 4)), Application.Sum(Application.Index(Ay, 5)))
- 'Drɶµ Application.Index(Ay, 4)
- 'Cr¶U¶µ Application.Index(Ay, 5)
- Ar = Application.Transpose(Application.Transpose(Ar))
- .[a10:e10].Resize(R).Value = Ar
- .PageSetup.PrintArea = "A3:" & .[a10:e10].Resize(R).Address '³]©w¦L¦C½d³ò
- .PrintOut '¦L¦C
- Erase Ar '«·sªì©l¤Æ©T©w¤j¤p°}¦Cªº¤¸¯À¡A¨ÃÄÀ©ñ°ÊºA°}¦CªºÀx¦sªÅ¶¡
- .[a10:e10].Resize(R) = ""
- R = 0
- End If
- Next
- End With
- End Sub
½Æ»s¥N½X |
|