- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-10-29 13:50 ½s¿è
¦^´_ 3# t8899
Large¨ç¼Æ ¤£¬O¯uªº¶Ç¦^¼Æȸê®Æ¤¤ªº²Ä´X¤j- Sub EX()
- Dim AR, k
- AR = Array(5, 5, 6, 6, 7, 7, 8)
- ' AR = Array(5, 6, 7, 5, 6, 7, 8)
- For k = 1 To UBound(AR) + 1
- MsgBox "²Ä " & k & " ¤j : " & Application.Large(AR, k)
- Next
- End Sub
½Æ»s¥N½X ¶·×§ï¤@¤U- Option Explicit
- Dim D As Object
- Private Sub CommandButton1_Click()
- Range("K3:S" & Rows.Count).ClearContents
- Dim a As Range, b As Long, k As Integer, aD As String
- ±Æ§ÇÈ Range("g2:g857")
- For k = 1 To IIf(D.Count >= 50, 50, D.Count)
- b = Application.Large(D.KEYS, k)
- Set a = Range("g2:g857").Find(What:=b, LookIn:=xlValues, lookat:=xlWhole)
- If Not a Is Nothing Then aD = a.Address
- Do While Not a Is Nothing
- Range("K100").End(xlUp).Offset(1) = a.Offset(0, -6) '¥N¸¹
- Range("L100").End(xlUp).Offset(1) = a.Offset(0, -5) '¦WºÙ
- Range("M100").End(xlUp).Offset(1) = a.Offset(0, 0) ' ±i
- Range("N100").End(xlUp).Offset(1) = a.Offset(0, -4) '»ù¦ì
- Set a = Range("g2:g857").FindNext(a)
- If a.Address = aD Then Exit Do
- Loop
- Next
- ±Æ§ÇÈ Range("h2:h857")
- For k = 1 To IIf(D.Count >= 50, 50, D.Count)
- b = Application.Large(D.KEYS, k)
- Set a = Range("h2:h857").Find(What:=b, LookIn:=xlValues)
- If Not a Is Nothing Then aD = a.Address
- Do While Not a Is Nothing
- Range("P100").End(xlUp).Offset(1) = a.Offset(0, -7) '¥N¸¹
- Range("Q100").End(xlUp).Offset(1) = a.Offset(0, -6) '¦WºÙ
- Range("R100").End(xlUp).Offset(1) = a.Offset(0, 0) ' ±i
- Range("S100").End(xlUp).Offset(1) = a.Offset(0, -2) '»ù¦ì
- Set a = Range("h2:h857").FindNext(a)
- If a.Address = aD Then Exit Do
- Loop
- Next
- End Sub
- '***********
- Private Sub ±Æ§ÇÈ(Rng As Range) '±Æ°£¦³«½Æªº¼ÆÈ
- Dim e As Range
- Set D = CreateObject("SCRIPTING.DICTIONARY")
- For Each e In Rng.SpecialCells(xlCellTypeConstants)
- If IsNumeric(e) Then D(e.Value) = ""
- Next
- End Sub
½Æ»s¥N½X |
|