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

[µo°Ý] ½Ð°Ý¦bvba¤¤ªº°}¦C¦p¦ó±Æ§Ç?

[µo°Ý] ½Ð°Ý¦bvba¤¤ªº°}¦C¦p¦ó±Æ§Ç?

¦p¦ó¦bVBA¤¤ªº°}¦C¥h§@±Æ§Çªº°Ê§@,(«D range, worksheet) ? ¸¹¥h§ä SORT §ä¤£¨ì, ¹Á¸Õ¥Î Swap «ü¥O¦æ¤£³q, Ãø¨ì­n¥Î³o¼ËªºªF¦è¶Ü?

Dim rd(5) As String
Dim tmp As string
Dim i, j As long
For i = 1 to 4
     for j = i + 1 to 5
         If rd(i) > rd(j) Then
             tmp = rd(i)
             rd(i) = rd(j)
             rd(j) = tmp
        Endif
next
¶Ü?
V98

¦^´_ 1# linshin1999
®ðªw¦¡±Æ§Çªk¡A¦bVB¤¤³Ì±`¨£ªº±Æ§Çªk
¦ý¦bEXCEL.VBA¸Ì­±¥i¥Î¨ì¤u§@ªí¨ç¼ÆÀ°¦£
°}¦C±Æ§Ç / Sorting Array / Sort Array
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh

¦p¤ì¤uª©¥D©Ò¨¥¤£¬O«ÜÀ´,¦ý¬O¦A¥Î¤O¥h¤F¸Ñ¬Ý¬Ý,¦pHsieh©Ò¨¥¬Ý¨ÓVBA¤¤没¤ä´©°}¦C±Æ§Ç,ÁÂÁÂ!!
V98

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-1-8 00:12 ½s¿è

¦^´_ 3# linshin1999
§Aªº¼gªk¦bVBÀô¹Ò¤¤¨ÃµL¨ç¼Æ¥i§Q¥Î
©Ò¥H¨Ï¥Î®ðªw±Æ§Çªk
¦bEXCELªºVBA¤¤¡A¦]¬°¤w¸g¦³¤u§@ªí¨ç¼Æ¥i§Q¥Î©Ò¥H´N¥iµ½¥[§Q¥Î
¦A°Ñ¦Ò³o©«
½Ð°Ý¦p¦ó±N°}¦C¤¤¤¸¯À±N¨ä¤j¤p§Ç¸¹¼g¤J²Ä¤Gºû¤¤?
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ linshin1999 ©ó 2011-1-8 00:32 ½s¿è

¦^´_ 4# Hsieh

  ±`±`¬Ý¨ìª©¥D¥Î¨ì Dictionary ªº¥Îªk,­n¦A¥Î¤O¥h¾Ç, ¨º»ò¤£¦P¶µ¥Ø¥X²{¦¸¼Æªº¥[Á`,¦n¹³ Dictionary ´N¬O¬°¦¹³]­pªº¬O¶Ü?§Ú·|¥h¬ã¨s¥¦.,ÁÂÁÂ!!
V98

TOP

°}¦C¤¤±Æ§Ç¬Ý¹L³\¦h¤èªk¡A¦p¤@¼Óªº«_ªwªk¡AÁÙ¦³±í±Æ§Çªk¡A§Æº¸±Æ§Çªk¡A¿ï¾Ü±Æ§Çªk¡A§Ö³t±Æ§Çªkµ¥µ¥¨Ã¤@¦Ó¨¬¡C®Ä²v¬Û¥h¤£»·¡A¤]¦³¤H«Ü¶O¤ßªº¥Î»¼°j½s¼g¸û°ª®Ä²vªº±Æ§Ç¡C
³o¨Ç¤èªk¥Ã»·¤ñ¤£¤Wexcel¦Û±aªº±Æ§Ç¡A©Ò¥H§â°}¦C¼g¤J¤u§@ªí¡A¥Î¤º«Ø±Æ§Ç«ü¥O±Æ§Ç¦n¦A©ñ¤J·sªº°}¦C¬O³Ì§Öªº¤èªk¡I

TOP

¦^´_ 6# oobird
¦p¶W¯Åª©¥D©Ò¨¥
"§â°}¦C¼g¤J¤u§@ªí¡A¥Î¤º«Ø±Æ§Ç«ü¥O±Æ§Ç¦n¦A©ñ¤J·sªº°}¦C¬O³Ì§Öªº¤èªk¡I"
¥i§_½Ð±z¼g¤@¬qµ{¦¡½X¥Ü½d¡AÅý§Ú¦³¦h¤@­Ó¾Ç²ßªº¾÷·|
ÁÂÁÂ
ASUS

TOP

¦^´_ 7# asus103
  1. Sub Ex()
  2.     Dim Ar, Rng As Range
  3.     Ar = Array("SD", 100, "SA", 50, 777, "AAA", 5)
  4.     With ActiveSheet
  5.         Set Rng = .[a1].Resize(UBound(Ar) + 1)
  6.         Rng.Value = Application.Transpose(Ar)
  7.         Rng.Sort Key1:=Rng(1), Order1:=xlAscending, Header:=xlNo
  8.         Ar = Application.Transpose(Rng)
  9.     End With
  10. End Sub
½Æ»s¥N½X

TOP

¦³¨Ç¸ê®Æ¬O¤£¾A¦X¨ì ¤u§@ªí ¥h³B²zªº,§Úªº¸ê®Æ¬O­n§@³]©w¥Îªº,¦b¤u§@ªí¤WªºÄæ¦C«Ü¤j,¬ù¦³(2000~10000),¦pªG¦³»P¸ê®ÆÀɤW¬Û¦Pªº¸ê®Æ­n³Q§@°O¸¹,¤ñ¦p¦r«¬³Q¶ÂÅé¦r¥N´À,¦]¬°¸ê®ÆÀɦ³¤j¤p¦¸§Ç©Ò¥H­n±Æ¦n¦¸§Ç¥H¦A¥h¤ñ¹ï·|¤ñ¸û§Ö,¥¦¬O­I´º§@·~¤£¬O«e´º§@·~,¥u¯à¥Î°}¦C¨Ó¼g¤£¯à¥Î Range ³B²z,§Úª¾¹D Excell ¤Wªº sort ¥\¯à,¦ý¬O¥Î¤£¤W. ©Ò¥H¬Ý¬O¤£¬O¦³ª½±µªº¤è¦¡¥h©I¥s,没¦³´N¦Û¤v¼g¤F,ÁÂÁ¤j®a.
V98

TOP

¦^´_ 9# linshin1999


    txtÀɱƧÇÄA­Ë
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¦a¤WºØ¤Fµæ¡A´N¤£©öªø¯ó¡F¤ß¤¤¦³µ½¡A´N¤£©ö¥Í´c¡C
ªð¦^¦Cªí ¤W¤@¥DÃD