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

[µo°Ý] ¸ó¤u§@ªí¨Ã«ü©wÀx¦s®æ¦b©¹¤U°j°é¬d¸ß

  1. Sub Âà¥X¸ê®Æ()
  2. Dim R&, xR As Range, xE As Range, N&
  3. If [¤u§@ªí1!A2] = "" Then MsgBox "**©|¥¼¶ñ¤J¦WºÙ! ": Exit Sub
  4. R = [¤u§@ªí1!B65536].End(xlUp).Row - 1
  5. If Application.Sum([¤u§@ªí1!D2].Resize(R)) = 0 Then
  6.    MsgBox "**©|¥¼¶ñ¤J¼Æ¶q! ": Exit Sub
  7. End If
  8. [¤u§@ªí2!B6:F200].ClearContents
  9. [¤u§@ªí2!B2] = [¤u§@ªí1!A2]
  10. For Each xR In [¤u§@ªí1!B2].Resize(R)
  11.     If Val(xR(1, 3)) = 0 Then GoTo 101
  12.     N = N + 1
  13.     [¤u§@ªí2!B5:F5].Offset(N, 0) = xR.Resize(, 5).Value
  14.     '----------------------------
  15.     Set xE = [¤u§@ªí3!D65536].End(xlUp)(2, -1)
  16.     If N = 1 Then xE(1, 0) = [¤u§@ªí1!A2]
  17.     xE.Resize(, 5) = xR.Resize(, 5).Value
  18. 101: Next
  19. With [¤u§@ªí1!D2].Resize(R)
  20.      .Copy [¤u§@ªí1!H2] '¼Æ¶q¶K¦Ü³Æ¦s°Ï, ¥H¨Ñ°Ñ¦Ò
  21.      .ClearContents '²MªÅ¼Æ¶q, «Ý¤U¦¸­«·s¿é¤J
  22. End With
  23. [¤u§@ªí1!A2] = "" '²MªÅ¦WºÙ, «Ý¤U¦¸­«·s¿é¤J
  24. [¤u§@ªí1!i2] = Date: [¤u§@ªí1!i3] = Time '°O¿ýÂà¥X¤é´Á®É¶¡
  25. End Sub
½Æ»s¥N½X
Xl0000100.rar (16.61 KB)


'=========================

TOP

        ÀR«ä¦Û¦b : ±o²z­nÄǤH¡A²zª½­n®ð©M¡C
ªð¦^¦Cªí ¤W¤@¥DÃD