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

¾î¦V±Æ§Ç°ÝÃD

¾î¦V±Æ§Ç°ÝÃD

ª½¦V±Æ§Ç¦bEXCEL¤¤¤w¦³±Æ§Ç¿ï¶µ¥\¯à¡C
¦ý¬O¡A§Ú·Q¶i¦æ¾î¦V¶¶§Ç±Æ§Ç, ¨Ò¦p:
A1=6¡BB1=19¡BC1=2¡BD1=5¡A±Æ¦¨: A1=2¡BB1=5¡BC1=6¡BD1=19¡A
A2=52¡BB2=19¡BC2=7¡BD2=16¡BE2=1¡A¾î¦V¶¶§Ç±Æ¦¨¡G1¡B7¡B16¡B19¡B52
À³¦p¦ó¥ÎVBA³B²z?

¦^´_ 1# pcwh3
  1. Sub SORT()
  2. Dim ARR()
  3. R = 1
  4. Do Until Cells(R, "A") = ""
  5.    LastC = Cells(R, 256).End(xlToLeft).Column
  6.    ReDim ARR(LastC)
  7.    For C = 1 To LastC
  8.      ARR(C) = WorksheetFunction.Small(Range("A" & R).Resize(1, LastC), C)
  9.    Next C
  10.    For C = 1 To LastC
  11.      Cells(R, C) = ARR(C)
  12.    Next C
  13.    R = R + 1
  14. Loop
  15. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# pcwh3

play.gif
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ wang ©ó 2012-2-15 01:27 ½s¿è

¾î¦V±Æ§Ç
¸ê®Æ>±Æ§Ç>¿ï¶µ>¤è¦V>´`¦C±Æ§Ç

R = 1
Do Until Cells(R, 1) = ""
    Range(Cells(R, 1), Cells(R, 1).End(xlToRight)).Select
    Selection.SORT Key1:=Cells(R, 1), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight, SortMethod _
        :=xlStroke, DataOption1:=xlSortNormal
        R = R + 1
Loop
Cells(R, 1).Select

TOP

¦^´_ 4# wang

¦hÁ¦U¦ìÀ°¦£, ¤F¸Ñ¤@¤G¤F.

½Ð°Ý¦pªG®æ¦¡¦pªþ¥ó©Ò¥Ü¡A§Ú­n±NG6°_¦ÜAR200(¼È©w)½d³ò¶i¦æ¾î¦V¶¶§Ç±Æ¦C¡A½d³ò¤§¤º¤@©w·|¦³ªÅ®æ¥X²{ªº¡C
§Ú¤£·Q³v¦æ³v¦æ¥Î¤H¤â§ï°Ê, VBA¥i¥H°µ¨ì¶Ü¡HÀ³¦p¦ó¼gªk?
ÁÂÁÂ.
test20120215.zip (8.99 KB)

TOP

¦^´_ 5# pcwh3
  1. Sub SORT()
  2. For R = 6 To [A65536].End(xlUp).Row
  3.     If Cells(R, "G") <> "" Then
  4.        Range(Cells(R, "G"), Cells(R, "G").End(xlToRight)).Select
  5.        Selection.SORT Key1:=Cells(R, "G"), Order1:=xlAscending, Header:=xlGuess, _
  6.          OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight, SortMethod _
  7.          :=xlStroke, DataOption1:=xlSortNormal
  8.        R = R + 1
  9.     End If
  10. Next R
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 6# register313
¦hÁÂÀ°¦£, ¥¿¬O§Ú·Q­nªº.

TOP

EXCEL¾î¦V±Æ§Ç¡A±Æ§Ç§¹²¦«á¡A·|¥X²{ªÅ®æ¡AµLªk¹F¨ì¯u¥¿ªº¾î¦V±Æ§Ç¡C
§Ú¦³1¸Uµ§¸ê®Æ¡A·Q­n°µ¨ì¾î¦V±Æ§Ç¡A¤£ª¾¹D¬O§_¦³¤j¤j¥i¥H¨ó§Uªº¡C
¥ÎVBA°µ¨ì³o­Ó¥\¯à¡C

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD