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

[µo°Ý]¦p¦ó§ä¥X¨C¤ë©T©w¤@µ§¸ê®Æ

[µo°Ý]¦p¦ó§ä¥X¨C¤ë©T©w¤@µ§¸ê®Æ

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-4-2 17:07 ½s¿è

½Ð°Ý¤wª¾¤é´Á¤¤¦p¦ó¦A¤@°ï¸ê®Æ¤¤¨C¤ë¸Ó¤é´Áªº¸ê®Æ¡A¤]´N¬O¨C¤ë¤@µ§¸ê®Æ¡H³Â·Ðªº¬O¸ê®Æ¬O¨C2~3¤Ñ¤£©w´Á¤@µ§¡A
­Y§ä¤£¨ì¸Ó¤ë¥÷ªº¤é´Á¸ê®Æ¡A´N¥H¸Ó¤é´Á«e¤éªº¸ê®Æ¬°·Ç¡A¸Ôªþ¥ó¨Ò¤l¡A½Ð¦U¦ì°ª¤âÀ°¦£¡I¡I

data.rar (39.64 KB)

¦^´_ 1# mfsong
±q°ÝÃDªº´y­z»Pªþ¥ó¬Ý¤£¥X±zªº§xÂZ»P´Á«Ý¬°¦ó¡A¥i§_´£¨Ñ¹w´Áµ²ªG½d¨Ò¡H
ÁÂÁ¡I

TOP

¦^´_ 2# p212


Sorry, «e­±»¡©ú¤£²M·¡¡F¸É¥R¦p«á¡G¨Ó·½¸ê®Æ¬O¦ý¬O¨C¹j2~3¤Ñ¤@µ§¤§³sÄò¼Æ¤ëªº¸ê®Æ¡A§Æ±æ¿é¤J©T©w¤@¤Ñ¸ê°T«á¡A¤§«á¯à¾ã²z¥X¸Ó¤ëªº·í¤Ñ¸ê®Æ¡A
¨Ò¦p¡G¿é¤J13¡A§Æ±æ¾ã²z¥X1/13, 2/13, 3/13,.....ªº¨C¦æ¸ê®Æ¡A¨ä¤¤­YµL2/13¡A«h©¹«e±À2/12¸ê®Æ¬°·Ç¡C
¥H¤W»¡©ú¡C

TOP

¦^´_ 3# mfsong
  1. Sub ex()
  2. Dim Mydate#, d%, Rng As Range, A As Range
  3. d = InputBox("¿é¤J°ò·Ç¤é", , 13)
  4. ym = Format([B1], "yyyy/")
  5. Set Rng = UsedRange.Columns(1)
  6. For i = 1 To 12
  7.   Mydate = DateValue(ym & i & "/" & d)
  8.   k = d
  9.   Do Until IsNumeric(Application.Match(Mydate, Rows(1), 0))
  10.   k = k - 1
  11.   If k < 1 Then GoTo 10
  12.   Mydate = DateValue(ym & i & "/" & k)
  13.   Loop
  14.   Mydate = DateValue(ym & i & "/" & k)
  15.   Set A = UsedRange.Columns(Application.Match(Mydate, Rows(1), 0))
  16.   Set Rng = Union(Rng, A)
  17. 10
  18. Next
  19. Rng.Select '¿ï¨ú¸ê®Æ½d³ò
  20. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh

Exactly!  µ{¦¡«Üºë²¡A¤£¹L¸ê®ÆµLªk³B²z¸ó¦~»¡...ÁÂÁ¤F¡I

TOP

¦^´_ 5# mfsong
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Mydate As Double, d As Integer, Rng As Range, A As Range, yy As Integer, i As Integer, k As Integer
  4.     d = InputBox("¿é¤J°ò·Ç¤é", , 13)
  5.     Set Rng = UsedRange.Columns(1)
  6.     For yy = Year([B1]) To Year([B1].End(xlToRight))        '¦~«×
  7.         For i = 1 To 12                                     '¤ë¥÷
  8.             For k = d To 1 Step -1                          '©¹«e§ä¤é´Á
  9.                 Mydate = DateValue(yy & "/" & i & "/" & k)
  10.                 If IsNumeric(Application.Match(Mydate, Rows(1), 0)) Then
  11.                     Set A = UsedRange.Columns(Application.Match(Mydate, Rows(1), 0))
  12.                     GoTo 10
  13.                 End If
  14.             Next
  15.             For k = d + 1 To Day(DateAdd("m", 1, DateValue(yy & "/" & i)) - 1) '©¹«á§ä¤é´Á
  16.                 Mydate = DateValue(yy & "/" & i & "/" & k)
  17.                 If IsNumeric(Application.Match(Mydate, Rows(1), 0)) Then
  18.                     Set A = UsedRange.Columns(Application.Match(Mydate, Rows(1), 0))
  19.                     GoTo 10
  20.                 End If
  21.             Next
  22. 10
  23.             If Not A Is Nothing Then Set Rng = Union(Rng, A)
  24.             Set A = Nothing
  25.         Next
  26.     Next
  27.     Rng.Select '¿ï¨ú¸ê®Æ½d³ò
  28. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 6# GBKEE


ÁÂÁª©¥D¡I°ÝÃD¸Ñ¨M¤F¡I§Ú´¿¦Û¤v¹Á¸Õ¸Ñ¨M¡A¦]«Ü¦h«ü¥O¤£¼ô¡A¨Ï±oµ{¦¡·d±o«Ü½ÆÂø¡A¦ý¬Ý±o¦U¦ì°ª¤â¦¡¤l¤Sµu¡A¸r¼}¦U¦ì¥\¤O¡I
THANKS¡I¡I

TOP

        ÀR«ä¦Û¦b : ¤Hªº¤ß¦a¬O¤@²¥¥Ð¡A¤g¦a¨S¦³¼½¤U¦nºØ¤l¡A¤]ªø¤£¥X¦nªºªG¹ê¡C -
ªð¦^¦Cªí ¤W¤@¥DÃD