- ©«¤l
- 262
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 280
- ÂI¦W
- 17
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- HK
- µù¥U®É¶¡
- 2015-8-11
- ³Ì«áµn¿ý
- 2024-11-19
|
¦^´_ 10# peter95 - Sub zz()
- Dim rng As Range, a, b, i&, j&, k&, n&, m&, s
- With Sheets(1)
- Set rng = .Range("c2:l" & .[b2].End(4).Row)
- a = rng.Value: b = a
- End With
- j = rng(1).Column - 1
- c = InputBox("¿é¤J¦C¸¹¥H¤ñ¸û¸¹¶¡¶}", , "G<H<I")
- s = Mid(c, 2, 1): c = Split(c, s)
- For i = 0 To UBound(c)
- c(i) = Columns(c(i)).Column - j
- Next
- n = UBound(c): m = 1
- For i = 2 To UBound(a)
- k = 0
- If s = "<" Then Call L(a, i, c, n, k) Else Call G(a, i, c, n, k)
- If k = n Then
- m = m + 1
- For j = 1 To UBound(a, 2)
- b(n, j) = a(i, j)
- Next
- End If
- Next
- With Sheets(2)
- .UsedRange.Clear
- .[a1].Resize(m, UBound(b, 2)) = b
- End With
- End Sub
½Æ»s¥N½X- Sub G(a, i, c, n, k)
- For j = 0 To n - 1
- If a(i, c(j)) > a(i, c(j + 1)) Then k = k + 1
- Next
- End Sub
½Æ»s¥N½X- Sub L(a, i, c, n, k)
- For j = 0 To n - 1
- If a(i, c(j)) < a(i, c(j + 1)) Then k = k + 1
- Next
- End Sub
½Æ»s¥N½X |
|