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

[µo°Ý] VBA ¦Û°Ê´¡¤J¦ÜªÅ¥Õ®æ¤è¦¡

[µo°Ý] VBA ¦Û°Ê´¡¤J¦ÜªÅ¥Õ®æ¤è¦¡

¥»©«³Ì«á¥Ñ lichang ©ó 2015-10-30 22:45 ½s¿è

½Ð°Ý¦U¦ì¤j¤j¡A§Ú»s§@¤F¤@­Óªí³æ¡A·Q­nÅý«È¤á¥i¥H¦Û¦æ¥[¤J·s°¨¹F
§Ú¸Ó¦p¦ó¼¶¼g¡AÅý«È¤á¶ñ¼g§¹¦¨ªº¸ê®Æ«á¡A¦Û°Ê´¡¤J¨ìªÅ¥Õªº¶ñªÅ®æ¡A(¦pC1,C2,C3®æ)¡A©ÎªÌ±Æ¨ìE1,E2,E3
µM«á¦A«ö·Ó°¨¹F³W®æ¤j¤p±Æ¦C¶¶§Ç??
¦p¤U¹Ï


·s¼W Microsoft Excel ¤u§@ªí.rar (6.25 KB)

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2015/11/25 08:01): ªþÀɬݬÝ

§Ú´ú¸Õ¹L¤F¡A§Úµo²{¬O©ñ¦b¼Ò²Õ¤¤¨Ï¥Î´N¥i¥H¤F¡A¦ý¬O§Ú°µ¦Aªí³æ¤¤¡A´N¦³°ÝÃD¤F!!!!

TOP

¦^´_ 15# lichang


Sub TEST()
Dim C&
With Sheets("¤u§@ªí2")
¡@¡@¡@C = .Cells(10, Columns.Count).End(xlToLeft).Column + 1
¡@¡@¡@Range(.[C10], .Cells(15, C)).Sort Key1:=.[C10], Order1:=xlAscending, Header:=xlNo, _
¡@¡@¡@¡@¡@OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight
End With
End Sub

¥H¤W´ú¸Õ¢Ý¢Ù¡A¤£¹L§Ú¬OOFFICE 2000¡A
±z¥i¨Ï¥Î¿ý»s¤è¦¡¨ú±o¡e¾î¦V±Æ§Ç¡fµ{¦¡½X¡A¦A®M¦Ü Sort ¨º¦æ¬Ý¬Ý¡ã¡ã

TOP

¦^´_ 14# ­ã´£³¡ªL

¤j¤j¡A¤p§Ì¯uªº«Ü¤£¤~¡A·Q®³±zªºµ{¦¡½X¨Ó­×§ï¡A¦ý¬O¤@ª½¨S¿ìªk¤F¸Ñ¯u¿Í
«ç»ò§ï³£¤@ª½µo¥Í¿ù»~¡A±z¤è«K¸ò§Ú»¡¤@¤U«ç»ò§ï¶Ü??
¥H¤U¬O§Ú­×§ïªºµ{¦¡½X

With Sheets("¤u§@ªí2")
      C = .Cells(10, Columns.Count).End(xlToLeft).Column + 1
      Range(.[C10], .Cells(15, C)).Sort Key1:=.[C10], Order1:=xlAscending, Header:=xlNo, _
          OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight




¥¼©R¦W.jpg

TOP

¦^´_ 13# lichang


Private Sub CommandButton1_Click()
Dim C&, i&
With Sheets("Sheet1")¡@
¡@¡@¡@C = .Cells(1, Columns.Count).End(xlToLeft).Column + 1
¡@¡@¡@For i = 1 To 3: .Cells(i, C) = UserForm1("TextBox" & i): Next
¡@¡@¡@Range(.[B1], .Cells(3, C)).Sort Key1:=.[B1], Order1:=xlAscending, Header:=xlNo, _
¡@¡@¡@¡@¡@OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight
End With
End Sub

ª`·N¬õ¦âªº . ¤£¥iº|±¼¡ã¡ã

TOP

¦^´_ 10# ­ã´£³¡ªL

¤j¤j½Ð°Ý¤@¤U¡A¦pªG§Ú¬O±q§Oªº¤À­¶¨Ó©I¥s¸Ó¤À­¶®É¡A«e­±­n«ç»ò¥[¡A¦]¬°§Ú²{¦b©I¥s®É¡A¥L¬O¥H§Ú¥Ø«e©I¥sªº¤À­¶¨Ó°µ±Æ¦C
¦Ó¤£¬O«ü©w¤À­¶

TOP

¦^´_ 10# ­ã´£³¡ªL

ª©¥D»yªk¯u¬O²¼ä¦³¤O¡A¤£·\¬OªO¥D

TOP

¦^´_ 9# lichang


    sorry¡A§ï³o¼ËÀ³¸Ó´N¦æ¤F
  1. Private Sub CommandButton1_Click()
  2. Dim Col As Integer
  3. Col = Sheets("¤u§@ªí1").[a1].End(xlToRight).Column + 1
  4. Cells(1, Col) = TextBox1.Value
  5. Cells(2, Col) = TextBox2.Value
  6. Cells(3, Col) = TextBox3.Value
  7. Range(Cells(1, 2), Cells(3, [iv3].End(1).Column)).Select
  8. Selection.Sort Key1:=Range("b1"), Order1:=xlAscending, Header:=xlGuess, _
  9.         OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight, SortMethod _
  10.         :=xlStroke, DataOption1:=xlSortNormal
  11. End Sub
½Æ»s¥N½X

TOP

Private Sub CommandButton1_Click()
Dim C&, i&
C = Cells(1, Columns.Count).End(xlToLeft).Column + 1
For i = 1 To 3: Cells(i, C) = UserForm1("TextBox" & i): Next
Range([B1], Cells(3, C)).Sort Key1:=[B1], Order1:=xlAscending, Header:=xlNo, _
¡@¡@¡@OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight
End Sub

TOP

¦^´_  lichang


    À°¸É¦Û°Ê±Æ§Ç
owen06 µoªí©ó 2015-11-4 09:48



¤j¤j¡A§Ú´ú¸Õ«á¡A±Æ¦C¶¶§Çµo¥Í°ÝÃD¡A¦]¬°¥L¬O§âª½±Æ¾ã­Ó­«·s±Æ¦C¡A¦ý¬O¥ª¥k¶¶§Ç¨S¦³ÅܤÆ
§Ú¬O§Æ±æ¥ª¥k±Æ¦C¶¶§Ç­n§ó´«¡A±Æ¦CÀu¥ý¬O°¨¹F³W®æ¡B½s¸¹¡BÅX°Ê¾¹

TOP

        ÀR«ä¦Û¦b : ¬°¦Û¤v§äÂǤfªº¤H¥Ã»·¤£·|¶i¨B¡C
ªð¦^¦Cªí ¤W¤@¥DÃD