| ©«¤l5923 ¥DÃD13 ºëµØ1 ¿n¤À5986 ÂI¦W0  §@·~¨t²Îwin10 ³nÅ骩¥»Office 2010 ¾\ŪÅv150 ©Ê§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
 ½Æ»s¥N½XOption 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
 | 
 |