ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] §Q¥Î¤U©Ô¦¡¿ï³æ¿ï¨ú¸ê®Æ¡A¨Ã¶i¦æ¶i¶¥¿z¿ï

[µo°Ý] §Q¥Î¤U©Ô¦¡¿ï³æ¿ï¨ú¸ê®Æ¡A¨Ã¶i¦æ¶i¶¥¿z¿ï

¦U¦ì¤j¤j­Ì:

·Q½Ð°Ý¤@¤U¡A§Ú·Q¥Î¤u§@ªí1ªº³o¨Ç¸ê®Æ¡A§Q¥Î"Âå®v¥N½X"³o­ÓÄæ¦ì°µ¥X¤U©Ô¦¡¿ï³æ¡A
¿ï¥X¤§«á§Æ±æ§e²{ª¬ºA¦p¤u§@ªí2¤@¼Ë¡A¨Ã¥BBÄæ¦ì»PEÄæ¦ì¶i¦æ¶i¶¥¿z¿ï(¤£­«½Æ)¡A¿ï¨ú¦bG»PIÄæ¦ì¤W¡A²ÄJÄæ¦ì¬O­pºâ¤½¦¡¡A³o¨Ç§@ªk¦p¦ó¥ÎVBA§e²{?

¥Ñ©ó¹ê»Ú¸ê®Æ¸û¬°Ãe¤j¡A¦p¥Î¤â°Ê¿z¿ï¤uµ{¯E¤j¡A¬G§Æ±æª½±µ¥ÎVBAªº»yªk¥h°õ¦æ¥¦¡A§Æ±æ¦U¦ì°ª¤â­ÌÀ°¦£!!! ·P¿E¤£ºÉ~~~

¤W¶Ç¥Î.zip (8.95 KB)

¦^´_ 13# ChuckBucket


¬Oªº~~

TOP

¦^´_ 12# ­ã´£³¡ªL
Hi ­ã¤j¡A
·PÁ§Aªº¦^ÂСC
©Ò¥HHsieh¤j¦bPrivate subùØÀYFor eachùØÀYªº¼gªk¡Ad(a.text) = ""¨ä¹êµ¥¦P©ód.add  a , ""¶Ü¡H
§Ú¯à³o¼Ë²z¸Ñ¶Ü¡H

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2019-4-13 10:54 ½s¿è

¦^´_ 11# ChuckBucket

¦r¨åÀÉ >> §Q¥Î"KEY"­È, ±a¤@­Ó"ITEM"
d(a.Text) = ""
a.Text ¬O KEY
"" ¬O ITEM, ³oITEM¥i¬°¥ô¦ó«¬ºA¸ê®Æ

¦]¥u¨ú¤£­«ÂÐ, ¥u¥Î±o¨ìKEY, ¤£°µ¨ä¥¦³B²z,
©Ò¥HITEM¥Î""ªÅ¦r²Å§Y¥i(¤]¥i¥Î¨ä¥¦¦r²Å©Î¼Æ¦r)
d(a.Text) = "A"
d(a.Text) = 1
³£¬O¥i¥H¹F¨ì¥Øªº, ¤£¹L¦b³o­Ó»Ý¨D¤W,"A"©Î1³£¨S¦³·N¸q
=============================
d(a.Text) = d(a.Text) + 1 ³o­Ó´N¥i¥H²Ö­p a.Text ªº¦¸¼Æ
¨ä¥¦¥Î³~¥i¦h¬Ý´X­Ó½d¨Ò©«§a!!!

TOP

¦^´_ 2# Hsieh

«¢ÅoHsieh¤j¡A
§Ú¦b½m²ß¦¹©«ªº¹Lµ{µo²{¤@¨Ç°ÝÃD¡C
·í¤¤³o¬q¥N½X·Q­n½Ð±Ð±z :
  1. Private Sub UserForm_Initialize()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. With ¤u§@ªí1
  4.    For Each a In .Range(.[D2], .[D2].End(xlDown))
  5.       d(a.Text) = ""
  6.    Next
  7. End With
  8. ComboBox1.List = d.keys
  9. End Sub
½Æ»s¥N½X
§ÚÀ´³o¤@¬qªº¥Î·N¬O­n±N¡u­n¬d¸ßªº¤£­«½Æ¶µ¥Ø¡v±a¶i¤U©Ô¦¡¿ï³æªº¿ï¶µ¶µ¥Ø¡F
¦ý¬O¦b For Each a In .Range(.[D2], .[D2].End(xlDown))©MNext¤¤ªºd(a.Text) = ""
§Ú¤£¤Ó¤F¸Ñ¬°¦ó­n±N©Ò¦³¶µ¥Øªº¤å¦rÅܦ¨""¡A³o¬q¼¶¼gªº½t¥Ñ¬O¨Ó¦Û¦ó³B¡H
ÁٳҷбzÀ°¦£¸Ñ´b¡C

TOP

ÁÂÁª©¥D¡A³o¥÷¸ê®Æ¤]Åý§Ú¸Ñ¨M§Úªº°ÝÃD¨Ã¥B¾Ç¨ì«Ü¦h¡I¡I¡I¡I

TOP

thanks ,¤S¾Ç²ß¨ì¤F

TOP

¦^´_ 7# Hsieh


    ·PÁ°ª¤âªºÁ¸§U! ¥i¥H¦¨¥\°õ¦æ¤F~~~ ÁÂÁÂ!!!

TOP

¦^´_ 6# Duck
  1. Private Sub ComboBox1_Change()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. Set d1 = CreateObject("Scripting.Dictionary")
  4. Set d2 = CreateObject("Scripting.Dictionary")
  5. Set d3 = CreateObject("Scripting.Dictionary")
  6. d2("CHT_IDX") = "BÄ椣­«½Æ¼Æ" 'L:MªºÄæ¦ì¦WºÙ"
  7. d3("CHT_IDX") = "BÄ椣­«½Æ¼Æ"
  8. With ¤u§@ªí2
  9. Set Rng = ¤u§@ªí2.[A1]
  10. .[A:E].ClearContents '²M°£¤§«e¿z¿ïµ²ªG
  11. With ¤u§@ªí1
  12.    With .Range("A1").CurrentRegion
  13.       .AutoFilter 4, ComboBox1 '¨Ì¾Ú¤U©Ô¿ï³æ¿z¿ï¸ê®Æ
  14.       .SpecialCells(xlCellTypeVisible).Copy Rng '±N¿z¿ïµ²ªG½Æ»s¨ì²Ä¤G¤u§@ªí
  15.       .AutoFilter '¨ú®ø¿z¿ï
  16.    End With
  17. End With
  18. mystr = "=COUNTIF(C5,RC9)/(COUNTA(C7)-1)" 'JÄ椽¦¡
  19. For Each a In .Range(.[B2], .[B1].End(xlDown)) 'BÄæ¸ê®Æ°µ°j°é
  20.     d(a.Value) = "" 'Àx¦sDATESEQ¤£­«½Æ²M³æ
  21.     d1(a.Offset(, 3).Value) = "" 'Àx¦sPRICE_NAME¤£­«½Æ²M³æ
  22.     d3(a.Offset(, -1).Value) = _
  23.     IIf(InStr(d3(a.Offset(, -1).Value), a) = 0, d3(a.Offset(, -1).Value) & ";" & a, d3(a.Offset(, -1).Value)) '¥HAÄ欰¯Á¤Þ¡A­Y¥¼§tBÄæ¦r¦ê¡A«h¥H¤À¸¹;³sµ²BÄæ¦r¦ê
  24.     d2(a.Offset(, -1).Value) = UBound(Split(d3(a.Offset(, -1).Value), ";")) '¥H¤À¸¹¤Á³Î¦r¦ê¡A­pºâ¥X°}¦C¤¸¯À¼Æ¶q¡A§Y¬°¦PCHT_IDXªº¤£­«½ÆBÄæ¼Æ¶q
  25. Next
  26. .Range("G1").CurrentRegion.Offset(1).ClearContents
  27. .[L:M].ClearContents '²M°£L:MÄæ
  28. '¼g¤JG:MÄæ
  29. .[G2].Resize(d.Count, 1) = Application.Transpose(d.Keys)
  30. .[I2].Resize(d1.Count, 1) = Application.Transpose(d1.Keys)
  31. .[L1].Resize(d3.Count, 1) = Application.Transpose(d3.Keys)
  32. .[M1].Resize(d2.Count, 1) = Application.Transpose(d2.items)
  33. .[J2].Resize(d1.Count, 1).FormulaR1C1 = mystr
  34. .[H2] = d.Count
  35. End With
  36. Unload Me '¨ø¸üªí³æ
  37. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh


±z¦n¡A³o­Óµ{¦¡¶]¥X¨Ó¤u§@ªí2ªºGÄæ¦ì»PIÄæ¦ìÁÙ¬O"¦U¦Û"ÁÙ¬O·|¥X²{­«½Æªº±¡§Î¡A½Ð°Ý»yªk­n¦p¦ó­×§ï¡A¤~·|¥¦­ÌÄæ¦ì¬O¥X²{¦U¦Û¤£­«½Æªº±¡ªp??


¸÷¨D¤j®vÀ°¦£~~~~:dizzy:

TOP

        ÀR«ä¦Û¦b : ¬O«D·í±Ð¨|¡AÆg¬ü§@ĵ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD