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

[µo°Ý] °}¦C¸ê®Æ¨ÌÄæ¦ì©ïÀY¦WºÙ¶i¦æÂ\©ñ

[µo°Ý] °}¦C¸ê®Æ¨ÌÄæ¦ì©ïÀY¦WºÙ¶i¦æÂ\©ñ

¥»©«³Ì«á¥Ñ art00083303 ©ó 2016-4-15 21:30 ½s¿è

»Ý¨D¦p¤U¹Ï©Ò¥Ü¡G

¦C¼Æ¤£ÅÜ¡AÄæ¦ì·|¦³¼W´î

§¹¦¨ªº¬õ¦âªí®æ¤¤¡AÄæ¦ì©ïÀY±Æ§Ç¤£­­¡C
§Ú¥Ø«e§@ªk¡G

1.¶]¦^°é¤è¦¡§ì¨ú¦U¤é´Á¤Uªº¸ê®Æ¡A§PÂ_Äæ¦ì¼Æ¶qNN¡A±N¼Æ¾Ú¥á¶i¦CArrdata(4-1,NN)¤¤
2.±NArrdata()¨ÌÄæ¦ì¶¶§Ç¥á¤J¬õ¦âªí®æ¡A³o­Ó¨BÆJ§Ú·Q¯}ÀY¤£ª¾¹D¸Ó¦p¦ó¹F¦¨¡Aªì¨B«äºü¡G
  a.¦]°}¦C¸ê®ÆArrdata(0,NN)¥]§tÄæ¦ì©ïÀY¦WºÙ¡A¤£¾å±o¬O§_¯à°÷§PÂ_Arrdata()¤º¨ÌÄæ¦ì©ïÀY¦WºÙ©ñ¤J¸ê®Æ¡A­Y¯ÊÄæ¦ì´N·s¼WÄæ¡C
b.©Î¬O§Úªº«äºü¬O¤£¥i¦æªº¡A¦³½Ð¤j¤j«ü¾É¡C

Question.JPG (131.72 KB)

Question.JPG

¥»©«³Ì«á¥Ñ luhpro ©ó 2016-4-16 04:17 ½s¿è

¦^´_ 1# art00083303

  1. Sub NN()
  2.   Dim iI%, iJ%, iCol%
  3.   Dim lRow&
  4.   Dim aR()
  5.   Dim vD
  6.   
  7.   [B22:I100].Clear ' ²M±¼¤W¤@¦¸ªº¸ê®Æ
  8.   
  9.   Set vD = CreateObject("Scripting.Dictionary")
  10.   iCol = 4
  11.   While Cells(21, iCol) <> ""
  12.     vD(CStr(Cells(21, iCol))) = iCol ' vD(¶µ¥Ø¦WºÙ) = Äæ¦ì¸¹½X
  13.     iCol = iCol + 1
  14.   Wend
  15.   
  16.   lRow = 22
  17.   For iI = 2 To 14 Step 6 ' 3 ­Óªí®æ
  18.     For iJ = 1 To 3
  19.       With Cells(lRow, 2)
  20.         .NumberFormat = "yyyy/m/d"
  21.         .Value = Cells(iI + iJ, 2) ' DATE
  22.       End With
  23.       
  24.       With Cells(lRow, 3)
  25.         .NumberFormat = "hh:mm"
  26.         .Value = Cells(iI + iJ, 3) ' TIME
  27.       End With
  28.       
  29.       iCol = 4
  30.       While Cells(iI + iJ, iCol) <> "" ' HTM »P ¨ä¥L
  31.          With Cells(lRow, vD(CStr(Cells(iI, iCol))))
  32.            .Value = Cells(iI + iJ, iCol)
  33.            .Interior.ColorIndex = Cells(iI + iJ, iCol).Interior.ColorIndex ' ³]©w©³¦â
  34.          End With
  35.          iCol = iCol + 1
  36.       Wend
  37.       lRow = lRow + 1
  38.     Next
  39.   Next
  40. End Sub
½Æ»s¥N½X
©ñ.zip (7.12 KB)

³Ì«á, ¦A©IÆ~¤@¤U,
­Y¸ê®Æ¸û¦h¥BµL³W«ß©Ê,
½Ð¶}¦êªº¤H¶¶«K´£¨Ñ½d¨ÒÀÉ,
¥i¥[§Ö¤j®a¦^¤åªº³t«×. (¸`¬Ù Key ½d¨ÒÀɸê®Æªº®É¶¡)

TOP

¦^´_ 2# luhpro
ÁÂÁÂluhpro ¤j¤j
§Ú§l¦¬¤@¤U±z´£¨Ñªº¥N½X¡A
±zªº©IÆ~¬O§Ú«ä¦Ò¥¼©P¨ì¤§³B¡A¤@©w§ï¶i~!

TOP

¦^´_ 2# luhpro
¸Õrun¤F¤j¤j´£¨ÑªºCode,
µo²{±zªº¤è¦¡¬O¡AÁ`ªíÄæ¦ì¦WºÙ¤wª¾¡A±N3­Óªí®æ¸ê®Æ¤Àªù§OÃþ§¹¦¨Á`ªí¡C
§Úªº°ÝÃD¶É¦V©ó¤wª¾Äæ¦ì¬°3­ÓªíªºÄæ¦ì©ïÀY(¦©°£"¤é´Á"¡B"®É¶¡"Äæ¡AÁ`ªíTotal¥¼¥²¬O6Äæ)¡AÂǥѤj¤j´£¨ÑªºCODE¡A¤p§Ì±ý§ï¶i¦a¤è¥d¦b©ó¡G
§PÂ_Á`¦@¦³´X­ÓÄæ¦ì©ïÀY(­«½ÆÄæ¦ìºâ°µ1Äæ)¡A¥»¨Ò¤¤­«½Æ©Êªº¦³6Äæ¡A«D­«½Æ©Êªº¦³2Äæ¡A¦]¦¹Á`ªí§Î¦¨Äæ¦ì¦@¦³6+2Äæ¡C
ÁٽФj¤j«ü±Ð¡C
©ñ.zip (18.84 KB)

TOP

¦^´_ 4# art00083303
¨º´N¦b§ì¨ú¸ê®Æ®É, ¤@¨Ö«Ø¥ßµ²ªG¼ÐÃDÄd : (·íµM, ¶¶§Ç·|Åܦ¨¨Ì§ì¨ú¥ý«á±Æ¦C)

  1. Private Sub cbMerge_Click()
  2.   Dim iI%, iJ%, iSCol%, iTCol%
  3.   Dim lRow&
  4.   Dim aR()
  5.   Dim vD
  6.   
  7.   Rows("21:" & Rows.Count).Clear ' ²M±¼¤W¤@¦¸ªº¸ê®Æ(§t¼ÐÃDÄd)
  8.   
  9.   Set vD = CreateObject("Scripting.Dictionary")
  10.   
  11.   Cells(21, 2) = "DATE"
  12.   Cells(21, 3) = "TIME"
  13.   
  14.   lRow = 22
  15.   iTCol = 4
  16.   For iI = 2 To 14 Step 6 '3 ­Óªí®æ
  17.     iSCol = 4
  18.     While Cells(iI, iSCol) <> "" ' Àˬd¼ÐÃDÄd
  19.       If Not (vD.Exists(CStr(Cells(iI, iSCol)))) Then
  20.         vD(CStr(Cells(iI, iSCol))) = iTCol
  21.         Cells(21, iTCol) = Cells(iI, iSCol)
  22.         iTCol = iTCol + 1
  23.       End If
  24.       iSCol = iSCol + 1
  25.     Wend
  26.    
  27.     For iJ = 1 To 3
  28.       With Cells(lRow, 2)
  29.         .NumberFormat = "yyyy/m/d"
  30.         .Value = Cells(iI + iJ, 2) ' DATE
  31.       End With
  32.       
  33.       With Cells(lRow, 3)
  34.         .NumberFormat = "hh:mm"
  35.         .Value = Cells(iI + iJ, 3) ' TIME
  36.       End With
  37.       
  38.       iSCol = 4
  39.       While Cells(iI + iJ, iSCol) <> ""
  40.         With Cells(lRow, vD(CStr(Cells(iI, iSCol))))
  41.           .Value = Cells(iI + iJ, iSCol)
  42.           .Interior.ColorIndex = Cells(iI + iJ, iSCol).Interior.ColorIndex ' ½Æ»s©³¦â
  43.         End With
  44.         iSCol = iSCol + 1
  45.       Wend
  46.       lRow = lRow + 1
  47.     Next
  48.   Next
  49. End Sub
½Æ»s¥N½X
©ñ-a.zip (11.18 KB)

TOP

¦^´_ 5# luhpro
¸g¹B¦æ¡A§¹¥þ²Å¦X»Ý¨D~!!
ÁÂÁ¤j¤j¡A¨ü±Ð¤F

TOP

        ÀR«ä¦Û¦b : «H¤ß¡B¼Ý¤O¡B«i®ð¤TªÌ¨ã³Æ¡A«h¤Ñ¤U¨S¦³°µ¤£¦¨ªº¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD