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

¤@ÁäÂà¶K¤u§@ªí¥B±Æ§Ç§ï¦p¦ó°µ©O

¤@ÁäÂà¶K¤u§@ªí¥B±Æ§Ç§ï¦p¦ó°µ©O

¤pªº·Q±qWEB§ì¨ú¸ê®Æ¦bSHEET1«á
§Q¥Î«öÁä°õ¦æ¥¨¶°±NSHEET1¤º²Ä¤G¦C¥H¤Uªº¤º®e½Æ»s¨ìSHEET2
¥B¦bSHEET¨Ì·ÓIÄæ(¦¨¥æ±i¼Æ)¥Ñ¤j¨ì¤p±Æ§Ç
¤£ª¾¹D¸Ó«ç»ò°µ
¤£ª¾¹D¦³¨S¦³«e½ú¥i¥HÀ°¦£©O

±Æ§Ç.rar (9.84 KB)

¤j­P¨BÆJ¦p¤U :
­º¥ý¥i¥H¥ý§ä¨ì¸ê®Æ°Ï³Ì¥½¤@¦Cªº¦C¸¹
    iRowEnd = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
±µµÛ Copy ·Q­n³B²zªº¸ê®Æ
   Sheets("Sheet1").Range(Sheets("Sheet1")..Cells(2, 1), Sheets("Sheet1")..Cells(iRowEnd, 10)).Copy
¦A¶K¹L¥h
   Sheets("Sheet2").Paste Destination:=Sheets("Sheet2").Cells(1, 1)
³Ì«á°µ±Æ§Ç
   Worksheets("Sheet2").Range("A2").Sort _
        Key1:=Worksheets("Sheet2").Columns("I"), _
        Header:=xlGuess
§Ú·QÀ³¸Ó´N¯à¹F¨ì§A­nªºµ²ªG¤F.

(µ{¦¡­n©ñ¦b¼Ò²Õ°Ï¤º)
  1. Sub nn()
  2.   Dim iRowEnd%
  3.   iRowEnd = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
  4.   With Sheets("Sheet1")
  5.     .Range(.Cells(2, 1), .Cells(iRowEnd, 10)).Copy
  6.   End With
  7.   With Sheets("Sheet2")
  8.     .Paste Destination:=.Cells(1, 1)
  9.      .Range("A2").Sort _
  10.         Key1:=.Columns("I"), _
  11.         Header:=xlGuess
  12.   End With
  13. End Sub
½Æ»s¥N½X

TOP

¤j­P¨BÆJ¦p¤U :
­º¥ý¥i¥H¥ý§ä¨ì¸ê®Æ°Ï³Ì¥½¤@¦Cªº¦C¸¹
    iRowEnd = Sheets("Sheet1").Cells(Rows.Count, ...
luhpro µoªí©ó 2011-7-7 05:32



    ¶W·PÁªº
ªGµM«Ü¨³³tªº±Æ¦C¥X¨Ó¤F
¯uªº«Ü¼F®`­C~~~
ÁÂÁ§A~:$

TOP

¦^´_ 2# luhpro
¨Ì¼Ó¥DªºªþÀɲ¤Æ¦p¤U
  1. Sub Ex()
  2.     With Sheet2
  3.         .Cells.Clear
  4.         Sheet1.Range("A3").CurrentRegion.Copy .[A1]
  5.         .[A1].Sort Key1:=.Columns("I"), Header:=xlYes
  6.     End With
  7. End Sub
½Æ»s¥N½X

TOP

GBKEEª©¥D,§Ú·Q°Ý¤@¤U,³o­Ó"With Sheet2"ªº¥Îªk,¦pªG§Ú·Q¦A¦h¥[¤@­¶°µ¬Û¦Pªº¤u§@,¥i¬O¶K¤Wªº¦ì¸m¤£¤@¼Ë,¸Ó«ç»ò¼g©O?ÁÂÁÂ!
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 5# am0251
¬O³o¼Ë¶Ü?
  1. Sub Ex()
  2.     Dim Rng As Range
  3.     Set Rng = Sheet1.Range("A3").CurrentRegion
  4.     With Sheet2
  5.         .Cells.Clear
  6.         Rng.Copy .[A1]
  7.         .[A1].Sort Key1:=.Columns("I"), Header:=xlYes
  8.     End With
  9.     With Sheet3
  10.         .Cells.Clear
  11.         Rng.Copy .[B3]
  12.         
  13.         '
  14.         '
  15.     End With
  16. End Sub
½Æ»s¥N½X

TOP

´N¬O³o­Ó·N«ä,¥u¬O§ÚÁÙ¨S¾Ç¹L"With"ªº³oºØ¥Îªk,¥¦ÁÙ¦³¨ä¥Lªº¥Î³~¶Ü?
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 7# am0251
¥i¬Ý»¡©ú   With ³¯­z¦¡

TOP

        ÀR«ä¦Û¦b : Ãø¦æ¯à¦æ¡AÃø±Ë¯à±Ë¡AÃø¬°¯à¬°¡A¤~¯àª@µØ¦Û§Úªº¤H®æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD