- ©«¤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
        
|
¦^´_ 11# papaya
°Ñ¦Ò¬Ý¬Ý,
¤£À´ªºVBAµ{¦¡½X,¥i±N¤£À´ªº¨ç¼Æ,¤èªk,¦bVBA»¡©ú¤W¬d¬Ý¦p Application,©Î Rows- Option Explicit
- Private Sub CommandButton1_Click()
- Dim Rng As Range, M As Integer
- Set Rng = Range("DK7", [DK7].End(xlDown))
- M = Application.Max(Rng)
- M = Application.Match(M, Rng, 0)
- [DT1] = Rng.Cells(M).Address(0, 0)
- With Rng.Resize(, 3)
- .Interior.ColorIndex = xlNone
- .Rows(M).Interior.ColorIndex = 8
- [dk4].Resize(, 3) = .Rows(M).Value
- End With
- End Sub
- Private Sub CommandButton2_Click()
- Dim Rng As Range, M As Integer
- Set Rng = Range("DK7", [DK7].End(xlDown)).Resize(, 3)
- For i = 1 To Rng.Columns.Count
- '*** ·j´M½d³ò¤ºªº¨CÓÄæ¦ìªº³Ì¤jÈ ****
- With Rng.Columns(i)
- 'M = Application.Max(.Cells)
- M = Application.Match(Application.Max(.Cells), .Cells, 0)
- [DT1].Offset(i - 1) = .Cells(M).Address(0, 0)
- End With
- With Rng
- If i = 1 Then .Interior.ColorIndex = xlNone
- .Rows(M).Interior.ColorIndex = Array(, 8, 15, 22)(i)
- [dk4].Offset(i - 1).Resize(, 3) = .Rows(M).Value
- End With
- Next
- End Sub
½Æ»s¥N½X |
|