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

[µo°Ý] §PÂ_³Q¿ï¨úªºÀx¦s®æ¡A¨Ã¨ú¥X©Ò¦b¦Cªº¬ÛÃö¸ê®Æ

  1. Private Sub CommandButton1_Click()
  2. Dim ay()
  3. With Sheets("­q³æ")
  4. r = ActiveCell.Row
  5. a = .Range(.Cells(r, "B"), .Cells(r, "D")).Value
  6. b = .Range(.Cells(r, "U"), .Cells(r, "W")).Value
  7. x = .Cells(r, "S")
  8. y = .Cells(r, "T")
  9. For Each c In .Range(.Cells(r, "G"), .Cells(r, "O")).SpecialCells(xlCellTypeConstants, 1)
  10. k = c.Column
  11. ar = Array(.Cells(3, k), "", c, Val(.Cells(2, k)), c * 20, Val(.Cells(2, k)) * c * 20)
  12. ReDim Preserve ay(s)
  13. ay(s) = ar
  14. s = s + 1
  15. Next
  16. End With
  17. With Sheets("¥X³f³æ")
  18. .[B9:G17] = ""
  19. .[C4].Resize(3, 1) = Application.Transpose(a)
  20. .[F4].Resize(3, 1) = Application.Transpose(b)
  21. .[B9].Resize(s, 6) = Application.Transpose(Application.Transpose(ay))
  22. .[G19] = x
  23. .[G21] = y
  24. .Select
  25. End With
  26. End Sub
½Æ»s¥N½X
¦^´_ 1# jesscc
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-8-27 15:27 ½s¿è

¦^´_ 3# jesscc

¦sÀɰÝÃD¥ý¦Û¤v·j´M¤å³¹¸Ñ¨M
¹J¨ì¤£À´¦A´£¥X
    rangetest.zip (22.73 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¬O«D·í±Ð¨|¡AÆg¬ü§@ĵ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD