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

[µo°Ý] ¦p¸ê®Æ¦æ¡B¦C¼Æ¤£¤@©w¦p¦ó²Î¤@¦X¨Ö¬°¨âÄd¥B¥HªÅ®æ¤À¶}

[µo°Ý] ¦p¸ê®Æ¦æ¡B¦C¼Æ¤£¤@©w¦p¦ó²Î¤@¦X¨Ö¬°¨âÄd¥B¥HªÅ®æ¤À¶}

¸ê®Æ»¡©ú.rar (10.54 KB)
§e¤W ¦]¸ê®Æµ§¼Æ¸û¦h ½Ð¦U¦ì«e½ú½ç±Ð ·P®¦

§e¤W ¦]¸ê®Æµ§¼Æ¸û¦h ½Ð¦U¦ì«e½ú½ç±Ð ·P®¦
billchenfantasy µoªí©ó 2013-2-18 14:16


Æ[¬Ý§AÁ|¨Òªºµ²ªG»P¤W¤è­ì½Z¤º®e¦ü¥G¦³³¡¤À¦a¤èµLªk¹ïÀ³,¨Ò¦p :
M12 ÁöµM¦³¹ïÀ³ 2002/9/24
¦ý§ä¤£¨ì M63 (0-0 2-2) ¸Ìªº 2-2 (M64 ¬O 1974/8/22 2002/9/24)
¬G°²³]§A­ì½Z¤¤ Plan_Dat_5 »P Plan_Dat_6 (§Y L Äæ»P M Ä涡)¤¤¶¡¦³¤@Äæ³Q»~§R¤F.
©³¤Uªºµ{¦¡¬O¥H¦¹°²³]¬°°ò¦°µ¥X¨Óªº.
  1. Sub ex()
  2.   Dim iCols%, iCol%
  3.   Dim lRows As Long, lRow As Long
  4.   
  5.   iCols = Cells(1, Columns.Count).End(xlToLeft).Column
  6.   Range(Columns(iCols - 1), Columns(iCols)).Cut
  7.   Columns(3).Insert xlShiftToRight
  8.   lRows = Cells(Rows.Count, 1).End(xlUp).Row
  9.   
  10.   For lRow = 2 To lRows
  11.     For iCol = 3 To iCols Step 2
  12.       If Cells(lRow, iCol) <> "" Then
  13.         Cells(lRow, 1) = Cells(lRow, 1) & " " & Cells(lRow, iCol)
  14.         Cells(lRow, iCol) = ""
  15.         Cells(lRow, 2) = Cells(lRow, 2) & " " & Cells(lRow, iCol + 1)
  16.         Cells(lRow, iCol + 1) = ""
  17.       End If
  18.     Next iCol
  19.   Next lRow
  20.   End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# billchenfantasy
¬O§_¤]­n±Æ°£­«½Æ?
  1. Sub ex()
  2. Dim Rng As Range, A As Range, C As Range
  3. Set d = CreateObject("Scripting.Dictionary")
  4. d("first") = Array("Mplan_no", "Mdate")
  5. [A1].End(xlToRight).Offset(, -1).Resize(, 2).EntireColumn.Cut
  6. [C1].Insert
  7. For Each A In Range([A2], [A2].End(xlDown))
  8. mystr = "": x = "": y = ""
  9.   Set Rng = A.EntireRow.SpecialCells(xlCellTypeConstants, xlNumbers)
  10.   For Each C In Rng
  11.      mystr = IIf(mystr = "", C.Offset(, -1) & C, mystr & C.Offset(, -1) & C)
  12.      x = IIf(x = "", C.Offset(, -1), x & " " & C.Offset(, -1))
  13.      y = IIf(y = "", C, y & " " & C)
  14.   Next
  15.   d(mystr) = Array(x, y)
  16. Next
  17. [C:D].Cut [A1].End(xlToRight).Offset(, 1)
  18. [C:D].Delete
  19. [A1].End(xlDown).Offset(3).Resize(d.Count, 2) = Application.Transpose(Application.Transpose(d.items))
  20. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# luhpro [/b
ÁÂÁ±zªºµªÂлP«ü¾É¡A½T¹ê·|¦]­pºâ¾É­P»~§Rªºª¬ªpµo¥Í¡A·PÁ±zªº²Ó¤ß¡C
±zªº¤½¦¡¦b¨Ï¥Î¹L«á¡A¸É»ô2-2¨º¤@Ä檺ª¬ªp¤U¥i¥H±N¸ê®Æ¾ã²z¦Ü±ý¹F¦¨ªº®æ¦¡¡C

µM¦Ó¦b¨S¦³¸É»ôªºª¬ªp¤U¡A«h·|µo¥Í¥H¤Uª¬ªp

±zªº¤½¦¡§Ú·|¦n¦n¾Ç²ß¡A¦A¦¸·PÁÂ

TOP

¦^´_ 3# Hsieh
·PÁ±zªºµªÂлP¨ó§U¡A­ì¨Ó¦³³o»ò¦h¼gªk¥i¥H°Ñ¦Ò
¦Ó¦b¹Á¸Õ¹B¥Î±zªº¤½¦¡®É¡Aµo²{¨Ã¥¼¥ý±N³Ì«á¨âÄd°Å¤U²¾¦Ü0-2¤§«e
¬O§_¬O¶·±N«á¤T¦æªº«ü¥O¶¶§Ç²¾°Ê©O?
·P®¦

TOP

¦^´_ 5# billchenfantasy

¸É¥R¤@ÂI_¸ê®Æ¬O¤£»Ý²¾°£­«½ÆªºÁÂÁ±z

TOP

¦^´_ 6# billchenfantasy

­Y¨Ì§Aªº½d¨Ò»¡©ú¬O­n²¾°£­«½Æ(­ì22¦C¸ê®Æ¡A¾ã²z«á¬°15¦C)
¬O¦³¥ý±N³Ì¥½2Äæ¦V«e²¾°Ê¡A¥u¬O¦³¦A«ì´_­ì»ª¦Ó¥H
  1. Sub ex()
  2. Dim Rng As Range, A As Range, C As Range
  3. Set d = CreateObject("Scripting.Dictionary")
  4. d("first") = Array("Mplan_no", "Mdate")    '·s¼ÐÃD
  5. [A1].End(xlToRight).Offset(, -1).Resize(, 2).EntireColumn.Cut  '³Ì«á2Äæ°Å¤U
  6. [C1].Insert  '¦bCÄæ´¡¤J°Å¤UªºÀx¦s®æ
  7. For Each A In Range([A2], [A2].End(xlDown))
  8. mystr = "": x = "": y = ""
  9.   Set Rng = A.EntireRow.SpecialCells(xlCellTypeConstants, xlNumbers)  '¥H¤é´Á§@¬°°ò·Ç
  10.   For Each C In Rng
  11.      'mystr = IIf(mystr = "", C.Offset(, -1) & C, mystr & C.Offset(, -1) & C) '­Y­n±Æ°£­«½Æ«h¨Ï¥Î¦¹¬°¦r¨å¯Á¤Þ
  12.      x = IIf(x = "", C.Offset(, -1), x & " " & C.Offset(, -1))
  13.      y = IIf(y = "", C, y & " " & C)
  14.   Next
  15.   s = s + 1
  16.   d(s) = Array(x, y)
  17.   'd(mystr) = Array(x, y)  '­Y­n±Æ°£­«½Æ«h¨Ï¥Î¦¹¬°¦r¨å¯Á¤Þ
  18. Next
  19. [C:D].Cut [A1].End(xlToRight).Offset(, 1)  '±NC:DÄæ°Å¤U¶K¦^¸ê®Æªí³Ì¥½ºÝ
  20. [C:D].Delete  'C:D°Å¤U«áÅܦ¨ªÅ¥ÕÄæ¡A©Ò¥H±N¨ä§R°£¡A¦^ÂЦ¨­ì¸ê®Æªí
  21. [A1].End(xlDown).Offset(3).Resize(d.Count, 2) = Application.Transpose(Application.Transpose(d.items))
  22. End Sub   
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 7# Hsieh
ÁÂÁ±zªº¸Ô²ÓµªÂÐ@@­ì¨Ó¦p¦¹
¦b½d¨Ò¤¤ªºµ²ªG¬O±NµL0-0ªº¦æ»P§¹¦¨¾ã²z«áªº¸ê®Æ¸g¤H¬°¤ñ¹ï«á§R°£ªºµ²ªG
¥Ñ©ó¨C¦¸¨ú±o¤§¸ê®Æ¾ã²z«á§¡¥²»Ý¸g¹L¤H¬°ªº¤ñ¹ï¦A¦æ§R°£¤@¨Ç¸ê®Æ(¦C)
¦³®É·|¦³¬Y¨Ç¦C¸ê®Æ­«½Æªº¯S¨Òµo¥Í
¬G¤~·|¤£»Ý¦Ûµ{¦¡¤¤¥ý¦æ§R°£
¦b½d¨Ò¤¤¨S¦³¸Ô²Ó»¡©ú¦b¦¹»¡Án©êºp¡A¤]·PÁ±zªº²Ó¤ß
¤£ª¾¬O§_¥i¥H¦A½Ð±Ð­Y±N"­«½Æªº¸ê®Æ§R°£"³o¶µ§ï¬°±NµL0-0ªº¨º¤@¦C§R°£
¤¤¶¡ªºµ{¦¡½X¥i¥H¦p¦ó§ó§ï£z ÁÂÁÂ

TOP

¦^´_ 8# billchenfantasy
¤£ª¾¬O§_¥i¥H¦A½Ð±Ð­Y±N"­«½Æªº¸ê®Æ§R°£"³o¶µ§ï¬°±NµL0-0ªº¨º¤@¦C§R°£   
§A»¡¥»¨Ò¤¤¬O¤H¤u¤ñ¹ï§R°£¤£§t0-0ªº¦C
¦ý¬O¡A­ì¸ê®ÆAÄæ³£¬O0-0¡A¬°¦ó¬O§R°£¤£§t0-0?
­Y±Æ°£¤£§t0-0ªº¦C¡A´N¦b¥[¤J¦r¨å®É§PÂ_¬O§_§t¦³0-0
  1. Sub ex()
  2. Dim Rng As Range, A As Range, C As Range
  3. Set d = CreateObject("Scripting.Dictionary")
  4. d("first") = Array("Mplan_no", "Mdate")    '·s¼ÐÃD
  5. [A1].End(xlToRight).Offset(, -1).Resize(, 2).EntireColumn.Cut  '³Ì«á2Äæ°Å¤U
  6. [C1].Insert  '¦bCÄæ´¡¤J°Å¤UªºÀx¦s®æ
  7. For Each A In Range([A2], [A2].End(xlDown))
  8. mystr = "": x = "": y = ""
  9.   Set Rng = A.EntireRow.SpecialCells(xlCellTypeConstants, xlNumbers)  '¥H¤é´Á§@¬°°ò·Ç
  10.   For Each C In Rng
  11.      'mystr = IIf(mystr = "", C.Offset(, -1) & C, mystr & C.Offset(, -1) & C) '­Y­n±Æ°£­«½Æ«h¨Ï¥Î¦¹¬°¦r¨å¯Á¤Þ
  12.      x = IIf(x = "", C.Offset(, -1), x & " " & C.Offset(, -1))
  13.      y = IIf(y = "", C, y & " " & C)
  14.   Next
  15.   If InStr(x, "0-0") > 0 Then '¾ã¦C¤¤¤£§t"0-0"
  16.   s = s + 1
  17.   d(s) = Array(x, y)
  18.   End If
  19.   
  20.   'd(mystr) = Array(x, y)  '­Y­n±Æ°£­«½Æ«h¨Ï¥Î¦¹¬°¦r¨å¯Á¤Þ
  21. Next
  22. [C:D].Cut [A1].End(xlToRight).Offset(, 1)  '±NC:DÄæ°Å¤U¶K¦^¸ê®Æªí³Ì¥½ºÝ
  23. [C:D].Delete  'C:D°Å¤U«áÅܦ¨ªÅ¥ÕÄæ¡A©Ò¥H±N¨ä§R°£¡A¦^ÂЦ¨­ì¸ê®Æªí
  24. [A1].End(xlDown).Offset(3).Resize(d.Count, 2) = Application.Transpose(Application.Transpose(d.items))
  25. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 9# Hsieh


    ÁÂÁ±zªº«ü¾É§Ú·|±N±zªºµ{¦¡¼gªk©M¤âÃä¨ä¥L¸ê®Æ²Î¾ã¤@¤U¡A¥[¤J¦r¨å§PÂ_ªº·Ç«h¡C¦n¦n¬ã¨s¤@µf¡A·PÁ±z

TOP

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD