ªð¦^¦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®¦

ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÂǦ¹©«½m²ß°}¦C,¾Ç²ß¤è®×¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð

°õ¦æ«e:


°õ¦æµ²ªG:



Option Explicit
Sub TEST()
Dim Brr, i&, j&, T$, xR As Range, Sh As Worksheet
Set Sh = Sheets("¤u§@ªí1")
Set xR = Range(Sh.[C1], Intersect(Sh.[D1].CurrentRegion, [D:G]))
Intersect(xR, [C:C]).ClearContents: Brr = xR
For i = 1 To UBound(Brr)
   T = Brr(i, 1)
   For j = 2 To UBound(Brr, 2)
      T = Replace(T & " " & Format(Brr(i, j), "e/m/d"), "  ", " ")
   Next
   Brr(i, 1) = Trim(T)
Next
xR = Brr
Set xR = Nothing: Set Sh = Nothing: Erase Brr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 14# Hsieh
·PÁ±zªºÀ°§U¥i¥H¶¶§Q°õ¦æ¤F~ ÁÂÁÂ

TOP

¦^´_ 13# billchenfantasy

·s°ÝÃDªºA¡BBÄæ¸ê®Æ¬O²Ä¤@­Ó°ÝÃD¾ã²zµ²ªG¡A¦ý¬OEÄõ¥H«áªº¸ê®ÆÀ³¸Ó¬O¥t¥~¿é¤J
©Ò¥HÀ³¸Ó¬O¤À¦¨¨â­Óµ{§Ç°õ¦æ¤~¹ï§a
¦Ü©ó­n«O«ù¥Á°ê¦~®æ¦¡
  1. Sub ex()
  2. Dim Ar()
  3. r = 2
  4. Do Until Application.CountA(Range(Cells(r, 4), Cells(r, Columns.Count))) = 0
  5.    Set a = Cells(r, "D")
  6.    Set Rng = Range(a, Cells(r, Columns.Count)).SpecialCells(xlCellTypeConstants)
  7.    For Each c In Rng
  8.    ReDim Preserve Ar(s)
  9.    Ar(s) = Format(c, "e/m/d")
  10.    s = s + 1
  11.    Next
  12.    a.Offset(, -1) = Join(Ar, " ")
  13.    Erase Ar: s = 0
  14.    r = r + 1
  15. Loop
  16. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 12# Hsieh
@@®¦...½Ð°Ý¬O­n§â¥Lª½±µ±µ¦b­ì¥»ªºµ{¦¡½X«á­±¶Ü¡A­ì¥»¥X²{­«½Æ«Å§iªºBOX¡A©Ò¥H§Ú´N§âDIM²¾¨ì«e­±¶}ÀY¡A¥i¥H°õ¦æ¡Aµ²ªG®æ¦¡¤@¼Ë¡A¦ý¬O¥Á°ê¥þÅܦ¨¦è¤¸¤F¡A§Ú¬O·Q«O¯d¥Á°ê¤é´Á¡A±N¨ä¾ã²z¦¨MDATE¨ºÄd¤@¼Ë¡C

TOP

¦^´_ 11# billchenfantasy
¬O³o­Ó·N«ä¶Ü?
  1. Sub ex()
  2. Dim Ar()
  3. r = 2
  4. Do Until Application.CountA(Range(Cells(r, 4), Cells(r, Columns.Count))) = 0
  5.    Set a = Cells(r, "D")
  6.    Set rng = Range(a, Cells(r, Columns.Count)).SpecialCells(xlCellTypeConstants)
  7.    For Each c In rng
  8.    ReDim Preserve Ar(s)
  9.    Ar(s) = Format(c, "yyyy/m/d")
  10.    s = s + 1
  11.    Next
  12.    a.Offset(, -1) = Join(Ar, " ")
  13.    Erase Ar: s = 0
  14.    r = r + 1
  15. Loop
  16. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 9# Hsieh


¤£¦n·N«äÃö©ó³o½gªº©µ¦ù¥i¥H¦A½Ð±Ð±z¥H¤Uªº°ÝÃD¶Ü
³o¬O§Ú©µÄò³o½gµªÂЦۦæ§ó§ï¼¶¼g¥ÑVBA¶]¥Xªºµ²ªG       
¸ê®ÆÄæ¡B¦Cªø«×¤£¤@©w¦ý©T©w¥ÑD³oÄd°_©l       
½Ð°Ý­n«ç»ò¦bµ{¦¡§ÀºÝ¦b¥[´X¶µÅýDÄd«á©Ò¦³¸ê®Æ¦bMDATE_T³oÄd¾ã²z¦¨¥ªÃäMDATEªº®æ¦¡       
1        ¦Û°Ê¿ï¾ÜDÄd¥H«áÄd¡B¦C¤W¦³¸ê®Æªº¥þ³¡½d³ò
2        ¦bC2¤U¤è¦X¨Ö°_¨Ó
°ÝÃD.rar (9.06 KB)

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

¦^´_ 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

¦^´_ 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

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD