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

¤@­Ó¬P´Á¤Ñªº°ÝÃD

b]¦^´_ 18# Hsieh

¤j¤j¦n,
¤W¤å¤¤®£ªí¹F¤£¦n, ²{ªþ¤W¹Ï¤ù, ¥i§_§â§âµ{¦¡§ï¦¨¹Ï1¬P´Á¤@¬P´Á¤GÃþÂà´«¦¨¤U¹Ï¤¤³æ¤@¼Æ¦r, ¤@,¤G,¤T,¥|,¤­,¤»,¤é,ÁÂÁÂ, ¯¬§Ö¼Ö..

TOP

¥»©«³Ì«á¥Ñ 317 ©ó 2011-6-29 23:20 ½s¿è

Hsieh¤j¤j, ¦w¦n..
¤w§âµ{¦¡Âন Ar(s) = Array(d, Replace(Format(mydate, "aaa"), "¶g", "")), ¦ýÁÙ¬O¤£¦¨¥\, ­ì¦]¦ó¸Ñ..½Ð¤j¤j¨ó§U

Sub Ex()

Dim Ar()

   y = [Am1]

   m = Val(ActiveSheet.Name)

   If m < 1 Or m > 12 Then MsgBox "¤u§@ªí¦WºÙ»Ý­n²Å¦X1~12¤ë": Exit Sub

   d = 1

   mydate = DateSerial(y, m, d)

   Do Until Month(mydate) <> m

     ReDim Preserve Ar(s)

     k = Format(mydate, "aaa")

     Ar(s) = Array(d, Replace(Format(mydate, "aaa"), "¶g", ""))

     s = s + 1

     d = d + 1

     mydate = DateSerial(y, m, d)

   Loop

   [G2:AK3] = ""

   [G2].Resize(2, s) = Application.Transpose(Ar)

End Sub

TOP

©Î

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-6-30 08:09 ½s¿è

¦^´_ 22# 317

¥i¯à¬Oª©¥»°ÝÃD
Formatªº®æ¦¡¥Î"aaa"¦b§Úªº¹q¸£¤W¬OÅã¥Ü"¶g¤é"
¦pªG§Aªº¹q¸£¤WÅã¥Ü¬O"¬P´Á¤é"
¨º´N±NReplaceªº¦r¦ê§ï¦¨"¬P´Á"§Y¥i
Ar(s) = Array(d, Replace(Format(mydate, "aaa"), "¬P´Á", ""))
©Î
Ar(s) = Array(d, Right(Format(mydate, "aaa"),1))
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ 317 ©ó 2011-6-30 07:25 ½s¿è

¯u¬O¤j¤j©Ò»¡, ª©¥»°ÝÃD,
¦b¦¹Á¹L¤j¤j, ¯¬Ä@§Ö¼Ö, ·P®¦..

TOP

Hsiehª©¥D¤j¤j,
¥ý¦æÁ¹L¦­«e©ó³o©«¤lªº¦^ÂÐ, ¦³¤@ºÃ°Ý, vbaµ{¦¡¤¤¥i§_Åܬ°ªþ¥ó¤¤, «ö¤U«ö¶s, ¦P®É§â12±i¤ë¥÷¤u§@ªí¬P´Á¤Î¤é´ÁÅܧó, ¦p¥i¥Hªº¸Ü, ªº½T¸`¬Ù¤F«Ü¦h®É¶¡, ÁÂÁÂ!!
aa.rar (24.05 KB)

TOP

¦^´_ 25# ©P¤j°¶
  1. Sub Ex()
  2. Dim y$, Ar(), w$, j%, i%
  3. y = InputBox("¿é¤J¦~¤À", , Year(Date))
  4. If y = "" Then Exit Sub
  5. For i = 1 To 12
  6.    d = Day(DateAdd("m", 1, DateSerial(CInt(y), i, 1)) - 1)
  7.    ReDim Preserve Ar(1 To 2, 1 To d)
  8.    For j = 1 To d
  9.    w = Replace(Format(Weekday(DateSerial(CInt(y), i, j), 2), "aaa"), "¶g", "")
  10.       Ar(1, j) = j
  11.       Ar(2, j) = w
  12.    Next
  13.    Sheets(i & "¤ë").[G2:AK3] = ""
  14.    Sheets(i & "¤ë").[G2].Resize(2, d) = Ar
  15.    Erase Ar
  16. Next
  17. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

  1. Sub Ex()
  2.     Dim y%, m%, n%, d%
  3.     y = [am1]
  4.     For m = 1 To 12
  5.         With Sheets(m & "¤ë")
  6.             .[g2:ak3] = ""
  7.             n = Day(DateSerial(y, m + 1, 1) - 1)
  8.             ReDim arr(1 To 2, 1 To n)
  9.             For d = 1 To n
  10.                 arr(1, d) = d
  11.                 arr(2, d) = Right(Application.Text(DateSerial(y, m, d), "aaa"), 1)
  12.             Next
  13.             .[g2].Resize(2, n) = arr
  14.         End With
  15.     Next
  16. End Sub
½Æ»s¥N½X
aa.rar (25.32 KB)

TOP

hsieh¤j¤j oobord¤j¤j,
°J¤ßÁ¹L两¦ìª©¥D¤j¤j¦^À³,  ¯¬Ä@°·±d§Ö¼Ö...

TOP

        ÀR«ä¦Û¦b : ¤H¥Í³Ì¤jªº¦¨´N¬O±q¥¢±Ñ¤¤¯¸°_¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD