- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 1# ii31sakura - Sub Test()
- Dim r As Long, sCond As String
- Dim d, sSN As String, sType As String, max, maxType
-
- 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
- sSN = Split(s, "-")(0)
- sType = Split(s, "-")(1)
- If sSN = sCond Then
- d(s) = d(s) + 1
- If d(s) > max Then max = d(s): maxType = sType
- End If
- Next
-
- .[J1].Value = maxType
- .[J2].Value = max
- End With
-
- End Sub
½Æ»s¥N½X |
|