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

[µo°Ý] ¨D§U~Ãö©óvbaªºµ{¦¡!

¦^´_ 13# Hsieh


½Ð°Ý~
¬°¤°»ò¦b°õ¦æ«á¥u¦³2008¦~ªº®æ¦¡·|¶]±¼©O?!
ÁÂÁ§A!

TOP

¹ïóø~Äæ¦ì¼Æ¦³®t!
§ÚÀ´¤F!¦ý§Ú²{¦bµo²{§Ú¸ê®Æ¦³¤@ÂI·d¿ù¤F!= =
§Ú¦A¥h­«§ì¸ê®Æ¤F!
ÁÂÁ§Aªº­@¤ß¦^ÂÐ!
¤S°ÝÃD¥i¥H¦A½Ð±Ð§A¶Ü?^^
ÁÂÁ§A!

TOP

¦^´_ 12# candy516

¦]¬°Äæ¼Æ¹L¦h¥²¶·¨Ï¥Î2007ª©¥»
  1. Sub ex()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. Application.ScreenUpdating = False
  4. With Sheet1
  5.    For Each a In .Range(.[A2], .[A2].End(xlDown))
  6.       d(a & Year(a.Offset(, 1))) = a.Offset(, 1).Value
  7.    Next
  8. End With
  9. For y = 2001 To 2004
  10.   With Sheets(CStr(y))
  11.     If Application.CountBlank(.Range(.[B1], .[XFD1].End(xlToLeft))) > 0 Then .Range(.[B1], .[XFD1].End(xlToLeft)).SpecialCells(xlCellTypeBlanks).EntireColumn.Delete
  12.     .Range(.[XFD1].End(xlToLeft).Offset(, 1), .[XFD1]).EntireColumn.Clear
  13.     k = 2
  14.     Do Until .Cells(1, k) = ""
  15.     .Columns(k + 1).Insert
  16.        mystr = .Cells(1, k) & y
  17.        Set a = .Columns("A").Find(d(mystr))
  18.        If Not a Is Nothing Then
  19.        cnt = 0
  20.          r = a.Row
  21.          test = .Cells(r + 1, k)
  22.          cnt = cnt + 1
  23.          Do Until .Cells(r, k) >= test Or .Cells(r, k) = ""
  24.          cnt = cnt + 1
  25.          r = r - 1
  26.          Loop
  27.          If r <= 2 Then
  28.          .Cells(a.Row, k + 1) = "µL¶ñÅv"
  29.          Else
  30.          .Cells(a.Row, k + 1) = cnt
  31.          End If
  32.        End If
  33.        k = k + 2
  34.     Loop
  35.   End With
  36. Next
  37. Application.ScreenUpdating = True
  38. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 11# Hsieh


½Ð°Ý¤j¤j~
¦pªG§Ú±Nµ{¦¡½XCOPYªº¥t¥~¤@­ÓÀÉ®×(²{ª÷ªÑ§Qªº)¡A¦³­þ¸Ì¬O»Ý­n§ïªº¶Ü?
¦]¬°¦n¹³µLªk®M¥Î¡A§Ú¦³¤W¶Ç¤@­Ó·sªºÀɮ׬O²{ª÷ªÑ§Qªº¡A¦ý¦]¬°ÀɮפӤj¡A
©Ò¥H§Ú¥ý±N³¡¤À¸ê®Æ§R±¼¡A¥u±q2005~2010!
ÁÂÁ§AªºÀ°¦£!

TOP

¦^´_ 10# candy516
  1. Sub ex()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. Application.ScreenUpdating = False
  4. With Sheet1
  5.    For Each a In .Range(.[A2], .[A2].End(xlDown))
  6.       d(a & Year(a.Offset(, 1))) = a.Offset(, 1).Value
  7.    Next
  8. End With
  9. For y = 2001 To 2010
  10.   With Sheets(CStr(y))
  11.     If Application.CountBlank(.Range(.[B1], .[IV1].End(xlToLeft))) > 0 Then .Range(.[B1], .[IV1].End(xlToLeft)).SpecialCells(xlCellTypeBlanks).EntireColumn.Delete
  12.     .Range(.[IV1].End(xlToLeft).Offset(, 1), .[IV1]).EntireColumn.Clear
  13.     k = 2
  14.     Do Until .Cells(1, k) = ""
  15.     .Columns(k + 1).Insert
  16.        mystr = .Cells(1, k) & y
  17.        Set a = .Columns("A").Find(d(mystr))
  18.        If Not a Is Nothing Then
  19.        cnt = 0
  20.          r = a.Row
  21.          test = .Cells(r + 1, k)
  22.          cnt = cnt + 1
  23.          Do Until .Cells(r, k) >= test Or .Cells(r, k) = ""
  24.          cnt = cnt + 1
  25.          r = r - 1
  26.          Loop
  27.          If r <= 2 Then
  28.          .Cells(a.Row, k + 1) = "µL¶ñÅv"
  29.          Else
  30.          .Cells(a.Row, k + 1) = cnt
  31.          End If
  32.        End If
  33.        k = k + 2
  34.     Loop
  35.   End With
  36. Next
  37. Application.ScreenUpdating = True
  38. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hsieh¤j¤j§A¦n~
    «z¡A§A¯uªº¦n¼F®`­ò!§Ú¤~§â´M§äÀx¦s®æ©³¦âªº¤èªk¬ã¨s¥X¨Ó¡A§A´N¼g¥X¨Ó¤F!¯u¬O¤Ó·PÁ¤F!
¤£¹L§Úªº¸ÑÄÀ¦n¹³ÁÙ¬O¤£°÷²M·¡= = !§Ú¦A»¡²M·¡¤@ÂI¡G
¹³¬OºÖÀ·­n¥L¬O9/7¤é°£Åv¡A©Ò¥H²Ä¤@¨BÆJ´N¬O¥Î9/7ªº¦¬½L»ù©M9/6ªº¤ñ(14.3>14.26)¡A©Ò¥H¦bC85¶ñ¤W1(¤Ñ)!
¦A¨Ó¬O1235¿³®õ¡A¥Lªº°£Åv¤é¬O9/13¡A©Ò¥H§Ú¥ý¥Î9/13©M9/10
(9/13ªº¦¬½L»ù46.1<9/10ªº¦¬½L»ù46.89)¡A©Ò¥H¦AÄ~Äò¤ñ
(9/14ªº¦¬½L»ù46.3<9/10ªº¦¬½L»ù46.89)¡A©Ò¥H­n¦AÄ~Äò¤ñ
(9/15ªº¦¬½L»ù48.75>9/10ªº¦¬½L»ù46.89)¡A
¦b³o¤@¤Ñ«h§ä¨ì§¹¦¨¶ñÅvªº!©Ò¥H´N¦AD81¶ñ¤W"3"(¤Ñ)
    ¤£ª¾¹D¤j¤j³o¼Ë¤F¸Ñ§Úªº·N«ä¶Ü?¯uªº¤£¦n·N«ä¡Aªí¹F¯à¤O¤£¬O«Ü¦n!
¯u¤ßªºÁÂÁ§A!^^

TOP

¦^´_ 8# candy516
  1. Sub ex()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. Application.ScreenUpdating = False
  4. With Sheet1
  5.    For Each a In .Range(.[A2], .[A2].End(xlDown))
  6.       d(a & Year(a.Offset(, 1))) = Array(a.Offset(, 1), a.Offset(, 2))
  7.    Next
  8. End With
  9. For y = 2001 To 2010
  10.   With Sheets(CStr(y))
  11.     If Application.CountBlank(.Range(.[B1], .[IV1].End(xlToLeft))) > 0 Then .Range(.[B1], .[IV1].End(xlToLeft)).SpecialCells(xlCellTypeBlanks).EntireColumn.Delete
  12.     .Range(.[IV1].End(xlToLeft).Offset(, 1), .[IV1]).EntireColumn.Clear
  13.     k = 2
  14.     Do Until .Cells(1, k) = ""
  15.     .Columns(k + 1).Insert
  16.        mystr = .Cells(1, k) & y
  17.        Set a = .Columns("A").Find(d(mystr)(0))
  18.        If Not a Is Nothing Then
  19.        cnt = 0
  20.          r = a.Row
  21.          test = .Cells(r - 1, k)
  22.          r = r + 1
  23.          cnt = cnt + 1
  24.          Do Until .Cells(r, k) >= test Or .Cells(r, k) = ""
  25.          cnt = cnt + 1
  26.          r = r + 1
  27.          Loop
  28.          If .Cells(r, 1) = "" Then
  29.          .Cells(a.Row, k + 1) = "µL¶ñÅv"
  30.          Else
  31.          .Cells(a.Row, k + 1) = cnt
  32.          End If
  33.        End If
  34.        k = k + 2
  35.     Loop
  36.   End With
  37. Next
  38. Application.ScreenUpdating = True
  39. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hsieh ¤j¤j§A¦n¡G
    Sheet1­ì©l¸ê®Æ¡A¹³¬OSGEET1ªºA2ªººÖÀ·ªo¡A¥Lªº°£Åv¤é2010/9/7¡A§Ú´N¥ý§âSHEET2ªºB85¥Î¶À©³¼Ð¥Ü¥X¨Ó¡A§Ú­n­pºâªº¬OSHEET2ªºB85(9/7)¬O§_¤j©óµ¥©óB86(9/6)(¶ñÅvªº·N«ä¬O»¡¡G°£Åv·í¤éªº¦¬½L»ù¬O§_¤j©óµ¥©ó°£Åv¤é«e¤@¤éªº¦¬½L»ù)¡A¦pªG¥H³o­Ó¨Ò¤l¨Ó»¡¡A°£Åv¤é·í¤Ñ«h¤w¸g¶ñÅv¡A´N¤£­n¦AÄ~Äò§ä9/8¡A¦ý¦pªG9/7¨S¦³¤j©ó9/6¡A«h¥²¶·¦A¥h¬Ý9/8¬O§_¤j©óµ¥©ó9/6¡AC85³o­ÓÀx¦s®æ§Ú¬O·QÅã¥Ü¥X¡F»Ý­n´X¤Ñªº®É¶¡¥i¥H§¹¦¨¶ñÅv¡C(¹³¬OºÖÀ·ªo«hÅã¥Ü1¡A¦]¬°¥L·í¤Ñ§Y§¹¦¨¶ñÅv)
    ¤£ª¾¹D¤j¤jÀ´¤£À´§Úªº·N«ä¡A¯uªº¬O«Ü¤£¦n·N«ä¡A·Q½Ð±Ð§AÁÙ§âÀÉ®×·d±o§A¬Ý¤£À´!
ÁÂÁ§AªºÀ°¦£!^^

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-1-17 16:20 ½s¿è

¦^´_ 6# candy516

§Ú¤£À´ªº¬O¡ASheet1°O¸ü¬O2010/9/7  ¬O°£Åv¤é
¦ý©p±Ô­z®É¤S¬OÅܦ¨2010/9/8
­Y±ø¥ó¨S¦¨¥ß¬O©¹«e§ä©Î¬O©¹«á§ä
§ä¨ì«á­n¦bC85¼g¤J¤°»ò­È?
¸U¤@°£Åv«á³£¨S¦^¤É¤S¸Ó¦p¦ó?
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ candy516 ©ó 2011-1-16 23:44 ½s¿è

Á|¨Ò¨Ó»¡¡G¹³¬O2010¦~1225 ºÖÀ·ªoªº°£Åv¤é¬O9/7(¶À©³)¡A©Ò¥H§Ú¥h¤ñ¸û1225 ºÖÀ·ªo9/7ªº¦¬½L»ù¬O§_¤j©óµ¥©ó9/8¡A¦pªG¨S¦³¡A´NÄ~Äò§ä¡A9/6ªº¦¬½L»ù¬O§_¤j©óµ¥©ó9/8ªº¦¬½L»ù¡Aª½¨ì§ä¨ì¬°¤î!³Ì«á±o¨ì»Ý­n´X¤Ñªº®É¶¡¡A¥i¥H§¹¦¨¶ñÅv(¬Y¤éªº¦¬½L»ù¤j©óµ¥©ó°£Åv¤é(9/8))¡C³Ì«á·s¼W¤@Äæ¡A±Nµ²ªGÅã¥Ü¦b°£Åv¤é(¶À©³®Ç)!
:)

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD