- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 255
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-24
|
¦^´_ 1# joey77373
§AÁ|¨Òªºµª®×¦ü¥G»PÀɮפº®e¤£²Å
²Ä¤@ÃDY¬O¥H20%¬°°ò·ÇÀ³¸Ó¥u¦³C¡BE
²Ä¤GÃD¬On§ä¥XL:Qªº³Ì¤jȶÜ?¨ºÀ³¸Ó¬OC¤¸¥óªºPÀù©Ê%¼Æ- Public Rng As Range
- Sub ²Ä¤@ÃD()
- Dim myInput, i As Integer, Ar As Variant, MyMax#, MyStr
- Dim Str As String, Dic As Object
- myInput = InputBox("½Ð¿é¤JÁ`¦¾¬VªùÂeÈ(%):")
- Set Dic = CreateObject("Scripting.Dictionary")
- For i = 2 To 9
- If Not IsNumeric(Cells(i, 9)) Then MsgBox "I" & i & "½Ð¿é¤J¼Æ¦r": Exit Sub
- If Cells(i, 9) >= (myInput / 1) Then
- Dic(Cells(i, 1).Value) = Array(Cells(i, 9), Cells(i, 1))
- If Rng Is Nothing Then Set Rng = Cells(i, "L").Resize(, 6) Else Set Rng = Union(Rng, Cells(i, "L").Resize(, 6))
- End If
- Next i
- If Dic.Count = 0 Then MsgBox "¨S¦³²Å¦X±ø¥óªº¤¸¥ó": Set Rng = Nothing: Exit Sub
- TestStr = Join(Dic.keys, ",")
- Do Until Dic.Count = 0
- Ar = Application.Transpose(Application.Transpose(Dic.items))
- MyMax = Application.Max(Application.Index(Ar, , 1))
- MyStr = Application.VLookup(MyMax, Ar, 2, 0)
- MsgBox "¤¸¥ó " & MyStr & " " & MyMax
- Dic.Remove MyStr
- Loop
- End Sub
½Æ»s¥N½X- Sub ²Ä¤GÃD()
- Dim MyMax#, MyStr$, MyTital$
- If Rng Is Nothing Then MsgBox "¥¼¦³²Å¦X¤§¤¸¥ó¡A½Ð¥ý°õ¦æ²Ä¤@ÃD": Exit Sub
- If Application.Count(Rng) <> Rng.Count Then MsgBox Rng.SpecialCells(xlCellTypeConstants, 2).Address & "¬°«D¼Æȸê®Æ": Exit Sub
- MyMax = Application.Max(Rng)
- MyStr = Cells(Rng.Find(MyMax, lookat:=xlWhole).Row, "A")
- MyTital = Cells(1, Rng.Find(MyMax, lookat:=xlWhole).Column)
- MsgBox "¤¸¥ó " & MyStr & MyTital & " " & Format(MyMax, "0.00%")
- End Sub
½Æ»s¥N½X ²Ä¤TÃD´N¬Ý¤£¥X»P²Ä¤@¡B¤GÃD¦³¦óÃöÁp©Ê¡A½Ð¸Ô²Ó»¡©ú¤§ |
|