- ©«¤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
|
¦^´_ 1# »k¥ú°j¯T
¸Õ¸Õ¬Ý- Option Explicit
- Private Sub CommandButton1_Click()
- Dim Rng(1 To 2) As Range
- Set Rng(1) = Range("c7", Range("c" & Rows.Count).End(xlUp))
- If Rng(1).Cells(1) = Range("c6") Then MsgBox "¤À¼ÆÄæ ¨S¦³¸ê®Æ": Exit Sub
-
- With Range("A6").Resize(Rng(1).Rows.Count + 1, 7)
- .Interior.ColorIndex = xlNone
- .Sort Key1:=Range("C6"), Order1:=xlDescending, Header:=xlYes '¦Û°Ê±Æ¦C¤j¤p(»¼´î±Æ§Ç)
- End With
- For Each E In Rng(1)
- 'AÄ椽¦¡
- E.Cells(1, -1) = "=IF(RC[2]="""","""",LOOKUP(RC[2],{0,701,1301,1501,1701},{""B"",""A"",""S"",""S+"",""SS""}))"
- E.Cells(1, -1) = E.Cells(1, -1).Value
- 'BÄ椽¦¡
- E.Cells(1, 0) = "=IF(RC[1]="""","""",RANK(RC[1],C[1]))"
- E.Cells(1, 0) = E.Cells(1, 0).Value
- Set Rng(2) = Range("H:H").Find(E.Cells(1, -1), LOOKAT:=xlWhole)
- E.Cells(1, -1).Interior.ColorIndex = Rng(2).Interior.ColorIndex
- E.Cells(1, 5).Interior.ColorIndex = Rng(2).Interior.ColorIndex
- Next
- End Sub
½Æ»s¥N½X |
|