ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ±Nvoucherªº¸ê®Æ¼g¤Jjournal¥X¿ù

¦^´_ 1# Hero2013
  1. my_journal.Cells(i, 7) = my_voucher.Cells(Voucher_First_line, 3) + " " + my_voucher.Cells(Voucher_First_line, 4)
  2. Debug.Print my_voucher.Cells(Voucher_First_line, 3), my_voucher.Cells(Voucher_First_line, 4), my_voucher.Cells(Voucher_First_line, 5)
½Æ»s¥N½X
¦r¦ê + ¦r¦ê ¬O¥i¥Hªº
¦r¦ê &  ¼Æ¦r ¤~¥¿½T  
½Ð¬Û¬ÝVBA ¹Bºâ¤lºK­n ªº»¡©ú




·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# Hero2013
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar(), Ay(), Rng As Range, i As Integer, R As Integer
  4.     With Sheets("print")
  5.         For i = .Range("G9").Value To .Range("H9").Value
  6.             With Sheets("Journal")
  7.                 Set Rng = .Range("A5", .Range("A5").End(xlDown)).Find(i, LOOKAT:=xlWhole)
  8.             End With
  9.             If Not Rng Is Nothing Then
  10.                 Do While Rng = i
  11.                     R = R + 1
  12.                     With Rng  
  13.                         ReDim Preserve Ar(1 To R)
  14.                         Ar(R) = Array(.Range("B1").Value, .Range("C1").Value, .Range("G1").Value, .Range("H1").Value, .Range("I1").Value)
  15.                     End With
  16.                     Set Rng = Rng.Offset(1)
  17.                 Loop
  18.                 Ay = Application.Transpose(Ar)
  19.                 R = R + 1
  20.                 ReDim Preserve Ar(1 To R)
  21.                 Ar(R) = Array("", "", "Á` ¼Æ:", Application.Sum(Application.Index(Ay, 4)), Application.Sum(Application.Index(Ay, 5)))
  22.                 'Dr­É¶µ Application.Index(Ay, 4)
  23.                 'Cr¶U¶µ Application.Index(Ay, 5)
  24.                 Ar = Application.Transpose(Application.Transpose(Ar))
  25.                 .[a10:e10].Resize(R).Value = Ar
  26.                 .PageSetup.PrintArea = "A3:" & .[a10:e10].Resize(R).Address  '³]©w¦L¦C½d³ò
  27.                 .PrintOut           '¦L¦C
  28.                 Erase Ar            '­«·sªì©l¤Æ©T©w¤j¤p°}¦Cªº¤¸¯À¡A¨ÃÄÀ©ñ°ÊºA°}¦CªºÀx¦sªÅ¶¡
  29.                 .[a10:e10].Resize(R) = ""
  30.                 R = 0
  31.             End If
  32.         Next
  33.     End With
  34. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 6# Hero2013
­×§ï¤@¤U After(°Ñ¼Æ):±q³Ì«á¶}©l·j´M
  1. Set Rng = .Range("A5", .Range("A5").End(xlDown)).Find(i, LOOKAT:=xlWhole, After:=.Range("A5").End(xlDown))
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¦Û¤v®`¦Û¤v¡A²ö¹L©ó¶ÃµoµÊ®ð¡C
ªð¦^¦Cªí ¤W¤@¥DÃD