- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 16# wang077
½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Private Sub CommandButton3_Click()
Dim Arr, Ar(), xD, i&, j&
Set xD = CreateObject("Scripting.Dictionary")
b = ComboBox1.Text
Sheets(b).Select
If Me.ComboBox2.Text <> "" And Me.ComboBox3.Text = "" Then
Arr = Sheets(b).AutoFilter.Range.Offset(1).SpecialCells(xlCellTypeVisible)
ReDim Ar(1 To UBound(Arr), 1 To 4): m = 1
For i = 1 To UBound(Arr)
T = Arr(i, 1) & Arr(i, 2) & Arr(i, 4)
If InStr(T, "´£À˼Æ") Or InStr(T, "¨}«~¼Æ") Or InStr(T, "¨}²v") Then
If xD(T & "/3") <> 1 Then
xD(T & "/3") = 1: m = m + 1
If Ar(1, 1) = "" Then '²Ä1¦C
Ar(1, 1) = Cells(2, 1): Ar(1, 2) = Cells(2, 2)
Ar(1, 3) = Cells(2, 4): Ar(1, 4) = Cells(2, 36)
End If
If xD(Arr(i, 1) & "/1") <> 1 Then xD(Arr(i, 1) & "/1") = 1: Ar(m, 1) = Arr(i, 1)
If xD(Arr(i, 2) & "/2") <> 1 Then xD(Arr(i, 2) & "/2") = 1: Ar(m, 2) = Arr(i, 2)
Ar(m, 3) = Arr(i, 4)
If InStr(T, "¨}²v") Then Ar(m, 4) = Format(Arr(i, 36), "0%") Else Ar(m, 4) = Arr(i, 36)
End If
End If
Next
With Me.ListBox1
.ColumnWidths = "40,50,70,40"
.List = Ar
.ColumnCount = m
End With
End If
Sheets(b).Select
End Sub |
|