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

[µo°Ý] VBA ·j´Mªº°ÝÃD

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


For j = 4 To .Cells(Rows.Count, 1).End(xlUp).Row

¢³¬°¬d¸ß¸ê®Æ¡e¨Ó·½¡f¤u§@ªí¡e¸ê®Æ©ú²Ó¡fªº¡e°_©l¦C¡f¡A»P¤W¤èªº¢³¤£¬ÛÃö¡A
¤@­Ó¬O¬d¸ßªí¡A¤@­Ó¬O¸ê®Æªí¡A¥u¬O­è¦n³£±q²Ä¢³¦C¶}©l¡A
¡Ä¡Ä¤£¦P¤u§@ªí¥²¶·¦³©T©wªºªí®æµ²ºc¡A§_«h®e©ö¥X¿ù¡ã¡ã

¨ä¥¦¤j­P³£¹ï¡ã¡ã

TOP

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

­è¹ê»Ú¾Þ§@¤@¹M¡A¹ê¦b¤Ó¼F®`¤F!!!!
§Ú«á¨Ó¦b¤u§@ªí1 ·s¼W¤F¤@­Ó±Æ§Çªº¥\¯à(¿ý»s¥¨¶°)
ÁÙ¨S¶ë¿ï®É ¬O¯à¥¿±`±Æ§Çªº
¦ý§Ú¤@¦ý¶ë¿ï®É ¦A±Æ§Ç EXCEL´N·í±¼¤F

¦A³Â·Ð±z¤F ·PÁ·PÁÂ
ªþ¤W»yªk

Sub ¥¨¶°3()
'
' ¥¨¶°3 ¥¨¶°
'

'
    Range("E4:E10000").Select
    ActiveWorkbook.Worksheets("¤u§@ªí1").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("¤u§@ªí1").Sort.SortFields.Add Key:=Range("E4:E10000"), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("¤u§@ªí1").Sort
        .SetRange Range("A3:E10000")
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Range("E4").Select
    Selection.End(xlDown).Select
End Sub

³]1¸U ¬O©È¤é«á¸ê®Æ¶V¨Ó¶V¦h XD"

TOP

¦^´_ 12# sss1159

±Æ§Çµ{¦¡½X³Ì¤W¤è¥[¤J¡G
ActiveSheet.AutoFilterMode = False

ª`·N¡G¿z¿ïª¬ºA®É¡A­Y¤£¥ý¸Ñ°£¿z¿ï¡A¥ô¦ó¾Þ§@³£¥i¯à³y¦¨µLªkÀ±¸Éªº¿ù»~¡]¤×¨ä¬O¤w°õ¦æ¤FÀx¦sµ²ªG¡^

TOP

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

ª`·N¡G¿z¿ïª¬ºA®É¡A­Y¤£¥ý¸Ñ°£¿z¿ï¡A¥ô¦ó¾Þ§@³£¥i¯à³y¦¨µLªkÀ±¸Éªº¿ù»~¡]¤×¨ä¬O¤w°õ¦æ¤FÀx¦sµ²ªG¡^

¦A´ú¸Õ®É¡A´N·í¤F¦n´X¦¸XD"

¥[¤F¨º¬q«á¡A´N¤£·|·í¤F¡A¦ý¬O¶ë¿ï·|³Q¨ú®ø±¼¡A½Ð°Ý¦³¿ìªk¶ë¿ï§¹¡A¦A±Æ§Ç¶ë¿ïªº¸ê®Æ¶Ü?

¤£¦n·N«ä¡A¤@ª½³Â·Ð±z:dizzy:
ªþ¤WÀÉ®×µ¹±z¬Ý

search.zip (28.2 KB)

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2015-11-10 12:57 ½s¿è

¦^´_ 14# sss1159

¸Õ¸Õ¬Ý 2003ªº±Æ§Ç
  1. Option Explicit
  2. Sub ¿z¿ï()
  3.     Dim X$
  4.     X = Application.InputBox("½Ð¿é¤J¿z¿ïÃöÁä¦r")
  5.     If X = "" Or X = "False" Then Exit Sub   '
  6.     With Sheets("¤u§@ªí1").[A3]  '
  7.         .Parent.AutoFilterMode = False
  8.         .AutoFilter Field:=1, Criteria1:="*" & X & "*"
  9.         If .End(xlDown).Row = Rows.Count Then MsgBox "§ä¤£¨ì¸ê®Æ!!": Exit Sub
  10.         .CurrentRegion.Sort Key1:=.Range("A2"), Order1:=xlAscending, Key2:=.Range("B2"), Order2:=xlAscending, Header:=xlYes
  11.     End With
  12. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 15# GBKEE

±z¦n¡A¨Ï¥Î¤F±zªº¤èªkÁÙ¬O·|¶]¥X­ì¥»ªº¸ê®Æ
§Úªþ­Ó¥Ü·N¹Ï=)

¦b³Â·Ð¤F><

¹Ï¤ù 6.png (46.08 KB)

¹Ï¤ù 6.png

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2015-11-10 13:28 ½s¿è

¦^´_ 16# sss1159
[·s¼W¤é´Á]  ¦bEÄæ(²Ä5Äæ)­×§ï¦p¤U:
  1. .CurrentRegion.Sort Key1:=.Range("A2"), Order1:=xlAscending, Key2:=.Range("E2"), Order2:=xlAscending, Header:=xlYes
½Æ»s¥N½X
  1. Sub ¿z¿ï()
  2.     Dim X$
  3.     X = Application.InputBox("½Ð¿é¤J¿z¿ïÃöÁä¦r")
  4.     If X = "" Or X = "False" Then Exit Sub   '
  5.     With Sheets("¤u§@ªí1").[A3]  '
  6.         .Parent.AutoFilterMode = False
  7.         '¿z¿ï«e¤]¥i©Ò¦³¸ê®Æ [·s¼W¤é´Á]±Æ§Ç
  8.         '.CurrentRegion.Sort Key1:=.Range("E2"), Order1:=xlAscending, Header:=xlYes
  9.         .AutoFilter Field:=1, Criteria1:="*" & X & "*"
  10.         If .End(xlDown).Row = Rows.Count Then MsgBox "§ä¤£¨ì¸ê®Æ!!": Exit Sub
  11.         '¥u¹ï¿z¿ï«á¸ê®Æ[·s¼W¤é´Á]±Æ§Ç
  12.         .CurrentRegion.Sort Key1:=.Range("E2"), Order1:=xlAscending, Header:=xlYes
  13.     End With
  14. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2015-11-10 13:29 ½s¿è

¦^´_ 14# sss1159

Sub ±Æ§Ç()
Dim R&
R = [¤u§@ªí1!A1].Cells(Rows.Count, 1).End(xlUp).Row
If R < 4 Then Exit Sub
With [¤u§@ªí1!A3:E3].Resize(R - 2)
¡@¡@¡@.Select¡@'³o¥i¥H§R±¼¡@
¡@¡@¡@.Sort Key1:=.Item(5), Order1:=xlAscending, Header:=xlYes, _
¡@¡@¡@¡@¡@¡@OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End With
End Sub

.Item(5)¡@§Y¬O¢ÓÄ檺¼ÐÃD¡e·s¼W¤é´Á¡f¡I
¦A´£¿ô¡G¡e¿z¿ï¡fª¬ºA¤¤¡A¾¨¶q¤£°µ¡e±Æ§Ç¡f¡A¤]¤£±q¥¦³B¶K¸ê®Æ¶i¨Ó¡A·|³y¦¨¸ê®Æ¿ù¶Ã

TOP

ÁÂÁ ¨â¦ìª©¥D©âªÅ¦^ÂÐ
¾Ç¨ì¤F«Ü¦h¡AºÃ°Ý¤]³£¸Ñ¨M¤F¡A
§Ú¦A¸ÕµÛ½m²ß¬Ý¬Ý¡A«D±`·PÁÂ

TOP

¦^´_ 17# GBKEE

°¨¤W´N¦³°ÝÃD¤F....ʨ
¥Ñ©ó¤W¤èµù¸Ñ»Ý­n¦h¤@¦æ¡AÅܦ¨¼ÐÃDÄæ¦bA4~E6
±N GBKEE¤jªº»yªkµy°µ­×¥¿

Sub ¿z¿ï123()
    Dim X$
    X = Application.InputBox("½Ð¿é¤J¿z¿ïÃöÁä¦r")
    If X = "" Or X = "False" Then Exit Sub
    With Sheets("¤u§@ªí3").[A4]  '
        .Parent.AutoFilterMode = False
        '¿z¿ï«e¤]¥i©Ò¦³¸ê®Æ [·s¼W¤é´Á]±Æ§Ç
        '.CurrentRegion.Sort Key1:=.Range("E2"), Order1:=xlAscending, Header:=xlYes
        .AutoFilter Field:=1, Criteria1:="*" & X & "*"
        If .End(xlDown).Row = Rows.Count Then MsgBox "§ä¤£¨ì¸ê®Æ!!": Exit Sub
        '¥u¹ï¿z¿ï«á¸ê®Æ[·s¼W¤é´Á]±Æ§Ç
        .CurrentRegion.Sort Key1:=.Range("C4"), Order1:=xlAscending, Header:=xlYes
    End With
End Sub

¶ë¿ï«á½T¥X²{¼ÐÃD¤]¤@¨Ö±Æ§Ç¶]¨ì³Ì¤U­±¥h¤F¡A¾É­Pª©­±¶Ã¤F...
¦A³Â·Ð¤F¦h¦¸¥oÂZ...

¹Ï¤ù 14.png (5.07 KB)

¹Ï¤ù 14.png

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD