- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 255
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-25
|
¦^´_ 6# Duck - Private Sub ComboBox1_Change()
- Set d = CreateObject("Scripting.Dictionary")
- Set d1 = CreateObject("Scripting.Dictionary")
- Set d2 = CreateObject("Scripting.Dictionary")
- Set d3 = CreateObject("Scripting.Dictionary")
- d2("CHT_IDX") = "BÄ椣«½Æ¼Æ" 'L:MªºÄæ¦ì¦WºÙ"
- d3("CHT_IDX") = "BÄ椣«½Æ¼Æ"
- With ¤u§@ªí2
- Set Rng = ¤u§@ªí2.[A1]
- .[A:E].ClearContents '²M°£¤§«e¿z¿ïµ²ªG
- With ¤u§@ªí1
- With .Range("A1").CurrentRegion
- .AutoFilter 4, ComboBox1 '¨Ì¾Ú¤U©Ô¿ï³æ¿z¿ï¸ê®Æ
- .SpecialCells(xlCellTypeVisible).Copy Rng '±N¿z¿ïµ²ªG½Æ»s¨ì²Ä¤G¤u§@ªí
- .AutoFilter '¨ú®ø¿z¿ï
- End With
- End With
- mystr = "=COUNTIF(C5,RC9)/(COUNTA(C7)-1)" 'JÄ椽¦¡
- For Each a In .Range(.[B2], .[B1].End(xlDown)) 'BÄæ¸ê®Æ°µ°j°é
- d(a.Value) = "" 'Àx¦sDATESEQ¤£«½Æ²M³æ
- d1(a.Offset(, 3).Value) = "" 'Àx¦sPRICE_NAME¤£«½Æ²M³æ
- d3(a.Offset(, -1).Value) = _
- IIf(InStr(d3(a.Offset(, -1).Value), a) = 0, d3(a.Offset(, -1).Value) & ";" & a, d3(a.Offset(, -1).Value)) '¥HAÄ欰¯Á¤Þ¡AY¥¼§tBÄæ¦r¦ê¡A«h¥H¤À¸¹;³sµ²BÄæ¦r¦ê
- d2(a.Offset(, -1).Value) = UBound(Split(d3(a.Offset(, -1).Value), ";")) '¥H¤À¸¹¤Á³Î¦r¦ê¡Apºâ¥X°}¦C¤¸¯À¼Æ¶q¡A§Y¬°¦PCHT_IDXªº¤£«½ÆBÄæ¼Æ¶q
- Next
- .Range("G1").CurrentRegion.Offset(1).ClearContents
- .[L:M].ClearContents '²M°£L:MÄæ
- '¼g¤JG:MÄæ
- .[G2].Resize(d.Count, 1) = Application.Transpose(d.Keys)
- .[I2].Resize(d1.Count, 1) = Application.Transpose(d1.Keys)
- .[L1].Resize(d3.Count, 1) = Application.Transpose(d3.Keys)
- .[M1].Resize(d2.Count, 1) = Application.Transpose(d2.items)
- .[J2].Resize(d1.Count, 1).FormulaR1C1 = mystr
- .[H2] = d.Count
- End With
- Unload Me '¨ø¸üªí³æ
- End Sub
½Æ»s¥N½X |
|