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

[µo°Ý] Aªí¨C³æµ§¸ê®Æ¥h¬d¸ßBªí ±o¥X¦h¦C¸ê®Æ ½Æ»s¨ìCªí [0613]¦¨¥\ÂP

[µo°Ý] Aªí¨C³æµ§¸ê®Æ¥h¬d¸ßBªí ±o¥X¦h¦C¸ê®Æ ½Æ»s¨ìCªí [0613]¦¨¥\ÂP

¥»©«³Ì«á¥Ñ milkpillow ©ó 2010-6-14 23:54 ½s¿è

¦U¦ì«e½ú
³o­Ó¼ÐÃD·Q¤F¤Q¤ÀÁ馳... ¤£¬O«Ü½T¤Á.½Ð¨£½Ì~_~

Aªí ¦³«Ü¦hµ§¸ê®Æ ID ¬O¤£­«½Æªº
Bªí ¦³«Ü¦hµ§¸ê®Æ SID ·|­«½Æ ¦ý¬O­È¤£·|­«½Æ (¦n¹³¤]¤£¹ï... À³¸Ó¬O ID+­È ¤£·|­«½Æ)
Cªí ¬O­n¿é¥Xµ²ªG¼Ë¤l (§Ú³£¥Î¤â°µ ¤@¦Êµ§¸ê®Æ´N­n¨â¤p®É...)

§Ú¤â°Êªº¾Þ§@¤è¦¡¡G
Aªíªº²Ä¤@µ§¸ê®Æ ªº STÄæ ½Æ»s¸Ó­È
¤Á´«Bªí ¨Ï¥Î¶i¶¥¿z¿ï¥\¯à ±o¥X¤Tµ§¥i¥Î¸ê®Æ (³o­Ó´Xµ§¨Ã¤£©T©w¡A°ò¥»¤WÀ³¸Ó¦Ü¤Ö¦³¤@µ§...)
¤Á´«Cªí ±N¤Tµ§¥i¥Î¸ê®Æ ½Æ»s¨ìCªí¶K¤W ¨Ã¥B§âAªíªºID ¸òPAGE¸ê°T¤]½Æ»s¹L¥h
¦^Aªíªº²Ä¤Gµ§¸ê®Æ¦AÄ~Äò½Æ»s..
¤â°Ê°j°é¨â­ÓÄÁÀY¤§«á ¤@¦Êµ§§¹¦¨...

¯uªº«ÜÃø¥Î°ê»y±Ô­z... ¦Ó¥B°µ°_¨Ó«Ü¶O®É¶¡..
§Ú·Ç³Æ¤F¤@­ÓÀÉ®× ½Ð«e½ú­Ì«üÂI¤@¤U.. ¸Ì­±§Ú¦³¼gµù¸Ñ..©È¤£©úÅã ©Ò¥H¥ÎÅã¥Ü ¥i¯à·|ê²´..

§Ú¥Îºô¸ô¬d¨ì ºô¯¸¦³½g¤å³¹«Ü¹³¦³Ãö«Y ¦ý¤w¸gµLªkµù¥U¸òÆ[¬Ý.. >"<
http://gb.twbts.com/index.php?topic=12801.0

¥H¤W ³Â·Ð±z(s)¤F

pro.zip (12 KB)

¦^´_ 1# milkpillow

     http://gb.twbts.com/index.php?topic=12801.0
    ¥DÃD: sheet2¤º®e©T©w,¤ñ¹ïsheet1«á,±N²Å¦Xªº¦C½Æ»s©ósheet3  

  Hsiehª©¥D   Re: sheet2¤º®e©T©w,¤ñ¹ïsheet1«á,±N²Å¦Xªº¦C½Æ»s©ósheet3
&laquo; ¦^ÂФ峹 #9 ©ó: 2010-02-28, 18:07:56 &raquo;  
µ{¦¡½X:
Sub nn()
Dim Rng As Range, A As Range, Cell As Range
With Sheet2
Set Rng = .Range(.[A1], .[A65536].End(xlUp))'³]¸m¤ñ¹ïªº¼Ð·Ç°Ï°ì
End With
With Sheet1
For Each A In .Range(.[D1], .[D65536].End(xlUp))'¦bsheet1ªºdÄæ¸ê®Æ´`Àô
¡@¡@If Not Rng.Find(A, lookat:=xlWhole) Is Nothing Then'¦pªG¼Ð·Ç°Ï§ä¨ìdÄ檺­È
¡@¡@¡@ If Cell Is Nothing Then Set Cell = A Else Set Cell = Union(Cell, A)'¦pªGÅܼÆCell¬O¤£¬Oª«¥ó´N±NdÄæ³]µ¹Cell§_«hCell´N·|±N­ì¨Ó½d³ò¼W¥[¤@Àx¦s®æA
¡@¡@End If
Next
End With
Sheet3.Cells = ""'²MªÅSheet3¤º®e
Cell.EntireRow.Copy Sheet3.[A1]'§âSheet1²Å¦Xªº¦C½Æ»s¨ìSheet3ªºA1
¡@¡@¡@
End Sub

TOP

¦^´_ 1# milkpillow
  1. Sub Q_Table()
  2. Dim A As Range, C As Range, Ar()
  3. With Sheets("B¥þ³¡¬ö¿ý")
  4. For Each A In .Range(.[A2], .[A1048576].End(xlUp))
  5.    Set C = Sheets("A¦¬¶°").Columns("C").Find(A, lookat:=xlWhole)
  6.      If Not C Is Nothing Then
  7.        ReDim Preserve Ar(s)
  8.        Ar(s) = Array(C.Offset(, -2).Value, C.Offset(, -1).Value, A.Offset(, 1).Value, A.Offset(, 2).Value, A.Offset(, 3).Value)
  9.        s = s + 1
  10.    End If
  11. Next
  12. End With
  13. Sheets("C¿é¥X").[A2:E1048576].Clear
  14. If s > 0 Then Sheets("C¿é¥X").[A2].Resize(s, 5) = Application.Transpose(Application.Transpose(Ar))
  15. Sheets("C¿é¥X").Select
  16. End Sub
½Æ»s¥N½X
pro.rar (19.82 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

§Ú¤w¤U¸ü´ú¸Õ §¹¥þ²Å¦X­n¿é¥Xªºµ²ªG
¦Ó¥B¦n¤è«K Àþ¶¡´î¤Ö§Úªº²Â¤èªk¤â°Ê°j°é ©Ò¯Ó¶Oªº®É¶¡»P¤O®ð...
¬ðµMı±o§Ú¦n´ù¤p... ³o°Ê§@¦Ü¤Ö®ö¶O§Ú¥Í©R¤¤ªº¾ã¾ã240­Ó¤p®É¦³..

³o»òÅãµÛªº´î¤Ö¤â°Ê¾Þ§@..
Åý¤p©f¹ï©óVBA§ó¦³¿³½ì¤F..
ÁöµM«Ü¦h«ü¥O¤£¤F¸Ñ §Ú¤Ó²L¤F...¦ý¬O§Ú·|¥h¬dªº..
¥ý·PÁ¨â¦ì¤j¤jªº¦^ÂÐ..

ºô¸ô¤W¦³³o­Ó½×¾Â¯u¦n~
¥@¬É¤W¦³¨â¦ì«e½ú¯u¦n~

TOP

¥»©«³Ì«á¥Ñ milkpillow ©ó 2010-6-10 12:48 ½s¿è

½Ð±Ð Hsieh »P ¦U¦ì«e½ú.
¹ê»ÚÀ³¥Î«áµo²{ ­«½Æªº­È ¥L¤£·|³B²z¥X¨Ó.(¦pªþ¥ó)
§Ú¬Ý¤F´X­Ó¤p®É ¹ê¦b¬O¤£¬Æ¤F¸Ñ...



Sub AA_Table()
Dim A As Range, C As Range, Ar() //©w¸qÅܼÆ
With Sheets("B¥þ³¡¬ö¿ý")      //¥ÎBªí
For Each A In .Range(.[A2], .[A1048576].End(xlUp)) //AÄæ ³v¦C³B²z
   Set C = Sheets("A¦¬¶°").Columns("C").Find(A, lookat:=xlWhole) //¦bA¦¬¶°ªºcÄæ ´M§äA . ¬O¤£¬O³oÃäÀ³¸Ó­n¤Ï¹L¨Ó¼g  ¦bB¥þ³¡¬ö¿ýAÄæ ´M§äA?
     If Not C Is Nothing Then
       ReDim Preserve Ar(s)
       Ar(s) = Array(C.Offset(, -2).Value, C.Offset(, -1).Value, A.Offset(, 1).Value, A.Offset(, 2).Value, A.Offset(, 3).Value) //³]©w C¿é¥X¤­Ä檺­È
       s = s + 1
   End If
Next
End With
Sheets("C¿é¥X").[A2:E1048576].Clear
If s > 0 Then Sheets("C¿é¥X").[A2].Resize(s, 5) = Application.Transpose(Application.Transpose(Ar))
Sheets("C¿é¥X").Select
End Sub

QQ.zip (21.6 KB)

TOP

¦^´_ 5# milkpillow


    ³o¼Ë2­ÓªíªºÃöÁp©Ê¤£¨¬
¨Ã¤£ª¾¹D¨Cµ§½T©wªº¤ñ¹ï¹ï¶H
½Ð»¡©ú2ªí¸ê®Æªº¤ñ¹ï³W«h
­«·s«ä¦ÒÅÞ¿è
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hsieh ¤j

³o­Ó ¬O»s³y·s°Ó«~¿ï¶µ¥ÎªºSQL¥Îªº..
¦³³S¤k¤W¦ç ¦³ªøT µuT ¦ý¬O¦U¦³¥Õ¦â¯»¬õÂŦâ¡A¥t¥~¤@­Ó±¡ªp «h­I¤ßA ¥u¦³¶À¦â¶Â¦â.
¨º»ò¦UºØ°Ó«~ ¦³ªºÃC¦â¨Ã¤£¤@©w.
¥Ø«e°µªº¬O±qªº«¬¸¹ ¥h¨ú±o³o­Ó°Ó«~¦³¤°»ò¦âªº¿ï¶µ.(´N¬OA¦¬¶°ªºCÄæ¦ì  ¹ïÀ³  B¥þ³¡¬ö¿ý ±o¥X¦h¦C¥i¥Î¸ê®Æ)
¨Ã±N²£¥Íªº ·sªº¿ï¶µ¶ë¨ì¸ê®Æ®w¤¤.
¨º»ò¦b¹ê»ÚÀ³¥Î¤W­± ¨C­Ó·s°Ó«~³£¦Ü¤Ö·|¦³¤@­Ó¿ï¶µ(¶°).

©Ò¥H¥Ø«eªº°ÝÃD¬O. (¤U­±±Ô­z½Ð¬d¬Ý¤W­±ªºªþÀÉQQ)
·s«¬¸¹A01~A05 ³£»Ý­n¦P¤@­ÓÃC¦â¿ï¶µ¶°555.(¸Ó¶°¦X¦³1¡B5¡B6¡B18¡B25¡B30¡B75ªºÃC¦â)
¦ý¬O¥L¥u·|§ì¨ìA01 ªº ÃC¦â¿ï¶µ¶°555
¹ê»Ú¤WA02~A05 À³¸Ó­n¤À§O²£¥Í¥X ÃC¦â¿ï¶µ¶°555.(¸Ó¶°¦X¦³1¡B5¡B6¡B18¡B25¡B30¡B75ªºÃC¦â)
¡ô¦]¬°¥L­Ì¾Ö¦³¬Û¦PªºÃC¦â¶°555

½Ð±z¦AÀ°§Ú¶O¯«¤@¤U ÁÂ¥ý

TOP

¦^´_ 7# milkpillow


    A¦¬¶°ªº«~¦W¸òB¥þ³¡¸ê®ÆªºOS_NAME¦³¬Æ»òÃö³s¹ïÀ³¯Á¤Þ?
©Î¬O½T©w¼Æ¶q·|¬Û¦P?
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ milkpillow ©ó 2010-6-12 16:15 ½s¿è

§Ú±NÀÉ®×¥þ³¡¾ã²z¦¨¤f»y¸ÜªºÄæ¦ì¦WºÙ
¨Ã¥B§R¥h¨S¦³¥Î¨ìªº.
¥[¤W¤F½bÀY¸òÃC¦â»¡©ú
§Æ±æ³o¼Ë¥i¥H¤ñ¸û¦n²z¸Ñ...
³Ò·Ð¤F ÁÂÁ±z¡ã

¦pªþ¥ó
QQ2.zip (24.84 KB)


¨S¦³°µ¤°»òªº½s¿è ¥u¬O¨S¦³¤H¬Ý¨£§Ú..

TOP

¦^´_ 9# milkpillow

¸Õ¸Õ¬Ý¬O¤£¬O³o¼Ëªº·N«ä
  1. Sub matchdata()
  2. Dim Ay()
  3. Set d = CreateObject("Scripting.Dictionary")
  4. With Sheet2
  5.   For Each A In .Range(.[A2], .[A65536].End(xlUp))
  6.      If d.exists(A.Value) = False Then
  7.         d(A.Value) = Join(Array(A, A.Offset(, 1), A.Offset(, 2), A.Offset(, 3)), ",")
  8.         Else
  9.         d(A.Value) = d(A.Value) & ";" & Join(Array(A, A.Offset(, 1), A.Offset(, 2), A.Offset(, 3)), ",")
  10.      End If
  11.     Next
  12. End With
  13. With Sheet1
  14.    For Each A In .Range(.[C2], .[C65536].End(xlUp))
  15.       If d.exists(A.Value) = True Then
  16.          Ar = Split(d(A.Value), ";")
  17.          For i = 0 To UBound(Ar)
  18.          ReDim Preserve Ay(s)
  19.          Ay(s) = Split(A.Offset(, -2) & "," & A.Offset(, -1) & "," & Ar(i), ",")
  20.          s = s + 1
  21.          Next
  22.          Else
  23.          If mystr = "" Then mystr = A Else mystr = mystr & "," & A
  24.         End If
  25.     Next
  26. End With
  27. With Sheet3
  28. .[A2:F65536] = ""
  29. .[A2].Resize(s, 6) = Application.Transpose(Application.Transpose(Ay))
  30. MsgBox mystr & "¨S§ä¨ì"
  31. End With
  32. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ­n§åµû§O¤H®É¡A¥ý·Q·Q¦Û¤v¬O§_§¹¬üµL¯Ê¡C
ªð¦^¦Cªí ¤W¤@¥DÃD