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

¦p¦ó°Ñ·Ó¸ê®Æ±N¤Ä¿ï¶µ«ü©w¦Ü½d³òÀx¦s®æ

¦^´_ 1# 074063
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim D As Object, i As Integer, Ar(), E As Variant
  4.     Set D = CreateObject("SCRIPTING.DICTIONARY")  '¦r¨åª«¥ó
  5.     i = 2
  6.     Do While Range("B" & i) <> ""  'B2¶}©lª½¨ìBÄæ¨S¸ê®Æ
  7.         If Range("C" & i) <> "" Then
  8.             If Not D.exists(Range("C" & i).Text) Then  '¦r¨åª«¥óªºkey¤£¦s¦b
  9.                 D(Range("C" & i).Text) = Array(Range("b" & i)) '³oªºkeyªº¶µ¥Ø¬°..
  10.             Else  '¦r¨åª«¥óªºkey¤w¦s¦b
  11.                 Ar = D(Range("C" & i).Text)         'Ar=¦r¨åª«¥óªºkeyªº¶µ¥Ø
  12.                 ReDim Preserve Ar(UBound(Ar) + 1)   '°}¦CÂX¥R¤@¤¸¯À
  13.                 Ar(UBound(Ar)) = Range("b" & i)     '°}¦C³Ì«á¤¸¯Àªº­È
  14.                 D(Range("C" & i).Text) = Ar         '¦r¨åª«¥óªºkeyªº¶µ¥Ø=Ar
  15.             End If
  16.         End If
  17.         i = i + 1
  18.     Loop
  19.     i = 1
  20.     With Range("E4")
  21.         For Each E In D.ITEMS      '¦r¨åª«¥óªº¶µ¥Ø
  22.             .Cells(1, i).Resize(1, UBound(E) + 1) = E
  23.             i = i + UBound(E) + 3
  24.         Next
  25.     End With
  26. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 8# 074063
17:20       
~       
19:20       
³o®É¶¡ªºÅÞ¿è¦p¦ó³]©w
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-1-12 05:59 ½s¿è

¦^´_ 14# 074063
¤]¥i¥H¤£¥Î ¦r¨åª«¥ó.
  1. Option Explicit
  2. '*** Ãþ§O¦³ÅÜ°Ê·s¼W©Î´î¤Ö¦b¼Ò²Õ¤WºÝ­×§ï,¤£¥²­×§ï¦¨¦¡½X***
  3. '¦pªG§ÚªºÃþ§O¦³3~4²Õ
  4. Const KeyWord = "VOX"
  5. '«h°Ï¤À®É¶¡¬Ò¦b¡iO¡jÃþ§O«e®É¶¡¬°17:20~19:20, ¦b¡iX¡jÃþ§O«e®É¶¡¬°17:20~18:20....
  6. Const KeyTime = "17:20,~,19:20" & vbLf & "17:20,~,24:20" '& vbLf &......

  7. Dim Rng As Range
  8. Sub Ex_²M°£¸ê®Æ()
  9.     Set Rng = Sheets("sheet1").Range("h7") '¿é¤Jªº¦ì¸m
  10.     With Rng.CurrentRegion
  11.         If Application.CountA(.Cells) > 0 Then .Clear
  12.     End With
  13. End Sub
  14. Sub Ex_¸ê®Æ¿é¤J()
  15.     Dim Ar(0 To Len(KeyWord) - 1), i As Integer, R As Integer, E As Integer, Ar_Time As Variant
  16.     Dim C As Integer
  17.     Ex_²M°£¸ê®Æ
  18.     Ar_Time = Split(KeyTime, vbLf)  'KeyTime¦r¦ê¤À³Î¬°°}¦C
  19.     Application.ScreenUpdating = False
  20.     i = 2
  21.     Do
  22.         R = InStr(KeyWord, Rng.Parent.Cells(i, "C"))  '³ÆµùÄ檺¦r¦ê,¦bKeyWord¤¤ªº¶¶§Ç
  23.         If Rng.Parent.Cells(i, "C") <> "" And R >= 1 Then
  24.             Ar(R - 1) = Ar(R - 1) & Rng.Parent.Cells(i, "B") & vbLf
  25.             '¨Ì KeyWordªº¦r¥À¶¶§Ç ±N©m¦WÄ檺¸ê®Æ,¾É¤JAr¤¤
  26.         End If
  27.         i = i + 1
  28.     Loop Until Rng.Parent.Cells(i, "b") = ""  'BÄæ¨S¦³¸ê®Æ
  29.     '******©m¦WÄ檺¸ê®Æ,¾É¤JAr¤¤ §¹²¦****
  30.     i = 0
  31.     For R = 0 To UBound(Ar)
  32.         Ar(R) = Split(Ar(R), vbLf)  '¾É¤JAr¤¤©m¦WÄæ¸ê®Æ,¤À³Î¬°°}¦C
  33.         For C = 0 To UBound(Ar(R)) - 1
  34.             With Rng.Offset(, i).Resize(3)
  35.                 .MergeCells = True
  36.                 .Orientation = xlVertical
  37.                 .Value = Ar(R)(C)
  38.             End With
  39.             i = i + 1
  40.         Next
  41.         If R < UBound(Ar) Then
  42.         For E = 1 To 3
  43.             With Rng.Offset(, i).Resize(, 2).Rows(E)
  44.                 .MergeCells = True
  45.                 .HorizontalAlignment = xlCenter
  46.                 .Value = "'" & Split(Ar_Time(R), ",")(E - 1)
  47.                 '°}¦C Ar_Time
  48.             End With
  49.         Next
  50.         End If
  51.         i = i + 2
  52.     Next
  53.     With Rng.CurrentRegion.Font
  54.         .Bold = True
  55.         .ColorIndex = 25
  56.     End With
  57.     Application.ScreenUpdating = True
  58. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 17# 074063

16# ªºµ{¦¡½X ¥i­×§ï
  1.    '******©m¦WÄ檺¸ê®Æ,¾É¤JAr¤¤ §¹²¦****
  2.     i = 0
  3.     For R = 0 To UBound(Ar)
  4.         If Ar(R) <> "" Then
  5.             Ar(R) = Split(Ar(R), vbLf)  '¾É¤JAr¤¤©m¦WÄæ¸ê®Æ,¤À³Î¬°°}¦C
  6.             For C = 0 To UBound(Ar(R)) - 1
  7.                 With Rng.Offset(, i).Resize(3)
  8.                     .MergeCells = True
  9.                     .Orientation = xlVertical
  10.                     .Value = Ar(R)(C)
  11.                 End With
  12.                 i = i + 1
  13.             Next
  14.         End If
  15.         If R < UBound(Ar) Then
  16.             For E = 1 To 3
  17.                 With Rng.Offset(, i).Resize(, 2).Rows(E)
  18.                     .MergeCells = True
  19.                     .HorizontalAlignment = xlCenter
  20.                     .Value = "'" & Split(Ar_Time(R), ",")(E - 1)
  21.                     '°}¦C Ar_Time
  22.                 End With
  23.             Next
  24.         End If
  25.         i = i + 2
  26.     Next
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¦³Ä@©ñ¦b¤ß¸Ì¡A¨S¦³¨­Åé¤O¦æ¡A¥¿¦p¯Ñ¥Ð¤£¼½ºØ¡A¬Ò¬OªÅ¹L¦]½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD