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

VAB ¸ê®Æ¤ñ¹ï¤ÎÂà¼g

¦^´_ 8# maggie1313
¤£¦n·N«ä¡AÃö©ó²Ä¤T¦æ¶}©l¹Ï¤ù¨S¦³ªþ¥[¦¨¥\¡A­«·sªþ¥ó
ÀÉ®×.rar (24.05 KB)

TOP

¦^´_ 10# maggie1313
¤£¦n·N«ä¡A¹q¸£²§±`¡A¬G­«·sµo°eÃö©ó¡u¦X¨Ö¸ê®Æ¡v±q²Ä¤T¦æ¶}©lªº¹Ï¤ù
ÀÉ®×.rar (24.05 KB)

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2016-4-1 03:14 ½s¿è
¦^´_  luhpro
§A¦n¡A·PÁ§Aªº¸Ñµª¡C´ú¸Õ«á¬OOKªº¡C¦ý²{¦b§Ú¦³¥t­Ó°ÝÃD·Q½Ð°Ý¡A¦p¹Ï
´N¬O§Ú­Ìªº¦X¨Ö¸ê®Æ­n ...
maggie1313 µoªí©ó 2016-3-30 11:12

¦P§Ú 2# ©Ò­z,
³o¸Ì¨Ì§Aµ²ªG¸ê®Æ¨Ó¬Ý¥u»Ý­n§ì³æ¤@¸ê®Æ,
¬G Dictionary ª½±µ¦s¸Ó¸ê®Æ.
  1. Sub DATABASE()
  2.   Dim lRow& ' ¦C¸¹
  3.   Dim wsSou1 As Worksheet, wsSou2 As Worksheet, wsTar As Worksheet '¤u§@ªí
  4.   Dim vD
  5.   
  6.   Set vD = CreateObject("Scripting.Dictionary")
  7.   Set wsSou1 = Sheets("EF³æÀY")
  8.   Set wsSou2 = Sheets("EF³æ¨­")
  9.   Set wsTar = Sheets("¦X¨Ö¸ê®Æ")
  10.   
  11.   With wsTar ' With wsTar »P End With ¶¡­Y¦³¥H . ¶}ÀYªº«ü¥O, ¨ä . µ¥¦P wsTar (¥ç§Y Sheets("¦X¨Ö¸ê®Æ"))
  12.     .Range(.[A2], .[D50]).Clear ' µ¥¦P wsTar.Range(wsTar.[A2], wsTar.[D50]).Clear  .[A2]=wsTar.Range("A2")
  13.   End With
  14.   
  15.   lRow = 1 ' ¦]¬°¨S¦³¼ÐÃD¦C, ¬G±q²Ä1¦C¶}©l§ì
  16.   With wsSou1 ' EF³æÀY
  17.     While .Cells(lRow, 8) <> "" ' Cells(¦C¸¹, Ä渹) Ä渹 8 = H Äd, ³v¦C§ì¨ú¸ê®Æ
  18.      vD(CStr(.Cells(lRow, 8) & "-" & .Cells(lRow, 9))) = .Cells(lRow, 14) ' vD("ODMGET_M00602-201602220001") = 4355 ­Y¥u­n§ìª÷ÃB,¨º´Nª½±µ©ñª÷ÃB
  19.       lRow = lRow + 1
  20.     Wend
  21.   End With
  22.   
  23.   lRow = 2
  24.   With wsSou2 ' EF³æ¨­
  25.     wsTar.Range(wsTar.[A2], wsTar.[D20]).Clear ' ²M°£¤W¦¸²£¥Íªº¸ê®Æ, ¥¿¦¡¨Ï¥Î¥i¥H§R±¼¦¹¦æ
  26.     While .Cells(lRow, 8) <> ""
  27.       wsTar.Cells(lRow, 1) = .Cells(lRow, 8)
  28.       wsTar.Cells(lRow, 2) = .Cells(lRow, 9) & "-" & .Cells(lRow, 10)
  29.         ' ¥Î "-" ¬O¦]¬° Áä(Key, ¯Á¤Þ)­È ¤º¨S¦³ "-", ¬G¥H¨ä°µ¬°¨âÄd¸ê®Æªº»Î±µ²Å¸¹,ÁקKÃþ¦ü111222333 ¥[¤W 123456 »P 1112223331 ¥[¤W 23456 ¨âªÌ·|µø¬°¬Û¦Pªº°ÝÃD.
  30.       wsTar.Cells(lRow, 3) = vD(CStr(.Cells(lRow, 8) & "-" & .Cells(lRow, 9))) ' ±q Dictionary ¤¤¯Á¤Þ EF³æÀY ªºª÷ÃB
  31.       wsTar.Cells(lRow, 4) = .Cells(lRow, 18) ' ±q R Äd(Ä渹 = 18)ª½±µ§ìª÷ÃB
  32.       lRow = lRow + 1
  33.     Wend
  34.   End With
  35. End Sub
½Æ»s¥N½X
VAB ¸ê®Æ¤ñ¹ï¤ÎÂà¼g.zip (24.85 KB)

¸É¥R :  ­è­è¤~¬Ý¨ì ²Ä¤G­¶ ªºµo¤å,
©Ò¥H¦C¸¹°_©l¼Æ¦r¨SÅÜ,
§A¥i¥Hª½±µ§ï¦¨§A»Ý­nªº¼Æ¦r´N¥i¥H¤F.

TOP

¦^´_ 13# luhpro
ÁÂÁ«ü¾É¡A¦³¥[¤Jµù¸Ñ¤ñ¸û²M·¡¤F¡C¦p¦³°ÝÃD¦A½Ð±Ð¡C¸U¤À·PÁÂ

TOP

¦^´_ 13# luhpro
¥Ø«e´ú¸Õ³£OK¡CÁÙ¦³´X­Ó°ÝÃD·Q­n¦b½Ð±Ð
¤@¡B¦pªG¨Ó·½³æÀYªº¸ê®ÆÁÙ¦³¦hµ§¸ê®Æ­n¸ü¤J¡u¦X¨Ö¸ê®Æ¡vªº¸Ü¡A¬O­n¦b¦h³]©w¦h­ÓÅܼƶÜ?¨Ò¡GVD2
       ¦]¬°²{¦b§Ú³o¼Ë³]©w¬OOKªº
¤G¡B¥t¥~µ{¦¡¤¤¦³¤@¬q§Ú¤£¬O«Ü²M·¡¥Î·N¡C¦ý§Ú¤]¨S¦³¼g¤W¥h¡A¦ý¤]¬O¥i¦æ¡A¨S¦³¿ù»~°T®§¡C
¤T¡B¥t¥~§Ú·Q­n¦b½Ð±Ð¤@­Ó°ÝÃD¡A°²³]§Úªº¦X¨Ö¸ê®Æ³£»ô¥þ¤F¡A­n³]­p¤@­Ó¬d¸ßªºªí³æµe­±¡AÅý¤H­û¬d¸ß«á¡A±N¬d¸ßªºµ²ªG¥t¥~¦b²£¥Í¤@­Ó­¶­±¡A¦ý¤º®e¬O¸ò­ì¦³ªº¡u¦X¨Ö¸ê®Æ¡v­¶Ã±¬Û¦P ¬¡­¶Ã¯1.rar (27.69 KB)

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2016-4-2 22:28 ½s¿è
¦^´_  luhpro
¥Ø«e´ú¸Õ³£OK¡CÁÙ¦³´X­Ó°ÝÃD·Q­n¦b½Ð±Ð
¤@¡B¦pªG¨Ó·½³æÀYªº¸ê®ÆÁÙ¦³¦hµ§¸ê®Æ­n¸ü¤J¡u¦X¨Ö¸ê ...
maggie1313 µoªí©ó 2016-4-1 11:42

§Ú¦b 2# ¦³»¡¤F³á :
¦pªG»Ý­n¥Î¨ì¾ã¦C¤¤¤£¥u¤@Ä檺¸ê®Æ,
¥i¥H¯Á¤Þ ¦C¸¹:
vD1(CStr(.Cells(lRow, 1))) = lRow
¦A¥Î
Sheets("¦X¨Ö").Cells(lRow, 2) = Sheets("¯Á¤Þ¤@").Cells(vD1(sStr), Ä渹)
¨Ó¨ú±o·Q­nªº¸ê®Æ.

¥u­nÅܧóÄ渹´N¥i¥H§ì¸Óµ§¸ê®Æ¤¤ªº¥ô¤@­Ó¸ê®Æ,
­«ÂI¬O­n¥ý¨ú±o¸Óµ§¸ê®Æªº¦C¸¹,
¬d¸ß®É¤]¬O¥H Key ­È(¦C¸¹)¨Ó¯Á¤Þ¸ê®Æªº.

©Ò¥H:
vD1(CStr(.Cells(lRow, 8) & "-" & .Cells(lRow, 9))) = .Cells(lRow, 14)
vD2(CStr(.Cells(lRow, 8) & "-" & .Cells(lRow, 9))) = .Cells(lRow, 15)
...
MixDB.Cells(lRow, 3) = vD1(CStr(.Cells(lRow, 8) & "-" & .Cells(lRow, 9)))
MixDB.Cells(lRow, 5) = vD2(CStr(.Cells(lRow, 8) & "-" & .Cells(lRow, 9)))

¥i¥H§ï¦¨:

vD1(CStr(.Cells(lRow, 8) & "-" & .Cells(lRow, 9))) = lRow
...
MixDB.Cells(lRow, 3) = EFhand.Cells(VD1(CStr(MixDB.Cells(lRow, 1) & "-" & Right(MixDB.Cells(lRow, 2), 12))),14) ' ¥u§ì«e 12 ­Ó¦r(201602220001)
MixDB.Cells(lRow, 5) = EFhand.Cells(VD1(CStr(MixDB.Cells(lRow, 1) & "-" & Right(MixDB.Cells(lRow, 2), 12))),15)
µ{¦¡Åܫܪø,¦ý¹ê»Ú¥i¨Ì§A»Ý¨Dµ½¥Î With »P End With ²¤Æ¤Î§Q©ó§PŪ.

¦Ü©ó VD2 ¥i¥H¯dµ¹ MixDB ¥Î .

¤T¡B¥t¥~§Ú·Q­n¦b½Ð±Ð¤@­Ó°ÝÃD...

vD2(CStr(MixDB.Cells(lRow, 1) & "~" & MixDB.Cells(lRow, 2)  = lRow ' ½Ð¯d·N¦P¼Ë¬°ÁקK»~§P,³o¸Ì§ï¥Î "~" ¦Ó«D "-"  ¨Ó°µ°Ï¹j.
«h ³æÀYª÷ÃB ¥i¥Î MixDB.Cells(VD2(CStr(TextBox1 & "~"  & TextBox2 & "-"  & TextBox3)), 3) ¨Ó§ì ' °²³] TextBox? ¤À§O©ñ ³æ¨­³æ§O ¡B ³æ¨­³æ¸¹ ¤Î §Ç¸¹

¤G¡B¥t¥~µ{¦¡¤¤¦³¤@¬q§Ú¤£¬O«Ü²M·¡¥Î·N...

³o¥u¬O­«½ÆÅçÃÒ°õ¦æµ²ªG«e²M¸ê®Æ¥Îªº,
¬Ý§A¹ê»Úªº»Ý¨D¤£¨£±o­n©ñ.

TOP

¦^´_ 7# luhpro
¤F¸Ñ¡AÁÂÁ¡C§Ú·|¦b¸Õ¸Õ

TOP

¦^´_ 16# luhpro
·PÁ§Aªº¨ó§U»P«ü±Ð¡CÃö©ó²Ä¤@­Ó°ÝÃD§Ú¨M©wÁÙ¬O¥ÎÅܼƪº¤è¦¡¡A¦]¬°§Ú¬Oªì¾ÇªÌ²Ä¤@¦¸¼g¡A³o¼Ë§Ú¤ñ¸û²M·¡¡C¦ýÁÙ¬O«Ü·PÁÂ
Ãö©ó²Ä¤T­Ó°ÝÃD¡A§Ú¤£¬O«Ü²M·¡¼gªk¡C§Ú¤w¸g¦³³]­p¦n¤@­Óuserformªº¬d¸ßµe­±¡A¸Ì­±·|¦³¬d¸ßªºÄæ¦ì¥Ø«e³]­p¤TÄæ¡C
¤H­û¥u­n¿é¤J¬d¸ßªº¸ê®Æ(ps.¦³¥i¯à¥u¿é¤J¤@µ§¡A¤Gµ§¡A©Î¤Tµ§¤£¤@©w)¡A¦ý¨t²Î­n¦í¥L©Ò¿é¤Jªº¸ê®Æí©M¡A¤~·|±N¬d¸ßªº¸ê®Æ¡u¦X¨Ö¸ê®Æ¡v¤º®e½Æ»s¨ì¡u¬d¸ß¡vªº­¶Ã±¡C

20160406.rar (36.42 KB)

TOP

¦^´_  luhpro
...
Ãö©ó²Ä¤T­Ó°ÝÃD¡A§Ú¤£¬O«Ü²M·¡¼gªk¡C§Ú¤w¸g¦³³]­p¦n¤@­Óuserformªº¬d¸ßµe­±¡A¸Ì­±·|¦³¬d¸ßªºÄæ¦ì¥Ø«e³]­p¤TÄæ¡C
¤H­û¥u­n¿é¤J¬d¸ßªº¸ê®Æ(ps.¦³¥i¯à¥u¿é¤J¤@µ§¡A¤Gµ§¡A©Î¤Tµ§¤£¤@©w)¡A¦ý¨t²Î­n¦í¥L©Ò¿é¤Jªº¸ê®Æí©M¡A¤~·|±N¬d¸ßªº¸ê®Æ¡u¦X¨Ö¸ê®Æ¡v¤º®e½Æ»s¨ì¡u¬d¸ß¡vªº­¶Ã±¡C ...
maggie1313 µoªí©ó 2016-4-6 17:51

Excel ¦³­Ó ¶i¶¥¿z¿ï ªº¥\¯à, §A¥i¥H¸Õ¸Õ :

¥ý§â User ¿é¤Jªº±ø¥ó¨Ì§Ç©ñ¤J C14 ~ E14,
¦A°õ¦æ¤U¦C«ü¥O:
  1. [A1].CurrentRegion.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=[C13:E14], CopyToRange:=[A22], Unique:=False
½Æ»s¥N½X
³Ì«á¦A§âµ²ªG [A22].CurrentRegion  Copy ¹L¥h§Y¥i.

TOP

¦^´_ 19# luhpro
§A¦n¡A·PÁ§Aªº¦^ÂСC¦ý¦Ñ¹ê»¡§Ú¬ã¨s¤F¤@¤U¡A¦ýÁÙ¤£¬O«Ü¤F¸Ñ§Aªº·N«ä ¡A¦]¬°¦¹¥÷¸ê®Æ¬O­nµ¹«eºÝªºUSER¨Ï¥Îªº¡A§Ú¤~³]©w¤@­ÓUSERFORMªº¤è¦¡¡C
©Ò¥H§A©Ò»¡ªºEXCEL¤¤ªº¿z¿ï¤]¦³¾A¥Î¶Ü?

TOP

        ÀR«ä¦Û¦b : ®É®É¦n¤ß´N¬O®É®É¦n¤é¡C
ªð¦^¦Cªí ¤W¤@¥DÃD