- ©«¤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
        
|
¦^´_ 4# ii31sakura
·í¥X²{³Ì¦h¦¸¼Æ¥Ø¤£¥u£¸¶µ®É- Sub Test()
- Dim r As Long, sCond As String
- Dim d As Object, k As Variant
- Set d = CreateObject("scripting.dictionary")
- With Sheets("Data")
- sCond = .[G1].Text
- r = .Cells(.Rows.Count, "A").End(xlUp).Row - 1
- If r <= 0 Then Exit Sub
- For Each s In .[A2].Resize(r).Value
- If sCond = Split(s, "-")(0) Then d(s) = d(s) + 1
- Next
- r = 0
- For Each k In d.keys
- If d(k) = Application.WorksheetFunction.max(d.ITEMS) Then '¥X²{³Ì¦h¦¸¼Æ¥Ø
- With .[J1].Offset(, r)
- .Value = Split(k, "-")(1)
- .Offset(1).Value = d(k)
- End With
- r = r + 1
- End If
- Next
- End With
- End Sub
½Æ»s¥N½X |
|