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

¦A¦¸½Ð°Ý¤@¤U....

¦A¦¸½Ð°Ý¤@¤U....

1.­n¦bvba³]±ø¥ó,½Ð°Ý¨C­Ó¤ëªº²Ä2­Ó§«ô¤@­n«ç»ò¼g

2.
Sub aaa()
For i = 549 To Worksheets("sheet1").Range("A1").End(xlDown).Row
If Cells(i, 10) > Cells(i, 11) Then
Set x = Cells(i, 8)
Do Until Cells(i, 10) < Cells(i, 11)     '¬õ¦âªºi¥i¥H¥ý¥[1¶Ü?¤]´N¬O¤W­±¦pªG¨D¥Xªºi¬O5,³oÃ䪽±µ¥ý¥N6,«á­±¦A¨C¦¸¥H1¼W¥[,¦pªG§ï¦¨Do Until Cells(i+1, 10) < Cells(i, 11)³o¼Ë¦n¹³¨C¦¸³£¼W¥[2?
i = i + 1
Loop
Set y = Cells(i, 8)
x.Offset(, 23) = y - x
End If
Next
End Sub

ÁÂÁ¦U¦ì~~~
ªì¾ÇªÌcolor

¦^´_ 3# color790
  1. Sub nn()
  2. Dim Ar(12)
  3. y = InputBox("¿é¤J¦~«×", , Year(Date))
  4. For i = 1 To 12
  5. k = 0: s = 1
  6.    Do Until k = 2
  7.       d = DateSerial(y, i, s)
  8.       If Weekday(d, 2) = 1 Then k = k + 1
  9.       s = s + 1
  10.    Loop
  11.    Ar(i - 1) = i & "¤ë²Ä2­Ó¬P´Á¤@¬O" & d
  12. Next
  13. MsgBox Join(Ar, Chr(10))
  14. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁÂGBKEE,LucªºÀ°¦£,µ¥·|¨Ó¸Õ¸Õ~
ªì¾ÇªÌcolor

TOP

¦^´_ 3# color790
  1. Sub Ex()
  2.     Dim m%, d%, S$, Work_Day As Date
  3.     For m = 1 To 12
  4.         '¨C¤ëªº²Ä¤@­Ó¤u§@¤Ñ
  5.         If m = 1 Then
  6.             Work_Day = Evaluate("WORKDAY(""" & DateSerial(Year(Date), m, 1) & """,1)")
  7.         Else
  8.             Work_Day = DateSerial(Year(Date), m, 1)
  9.             Do Until Weekday(Work_Day, vbMonday) <= 5
  10.                 Work_Day = Work_Day + 1
  11.             Loop
  12.         End If
  13.         For d = 1 To 11     '²Ä¤@©P¨ì²Ä¤G©P ³Ì¤j¶¡¹j¼Æ 2010/1¤ë¬°¨Ò
  14.             If DatePart("ww", DateSerial(Year(Date), m, d), vbMonday) > DatePart("ww", Work_Day, vbMonday) Then
  15.                 S = S & Chr(10) & DateSerial(Year(Date), m, d)
  16.                 Exit For
  17.             End If
  18.         Next
  19.     Next
  20.     MsgBox S
  21. End Sub
½Æ»s¥N½X

TOP

¨C¤ë²Ä¤G­Ó§«ô¤@¡A§Ú¬O¥Îºâªº¡A´£¨Ñµ¹±z°Ñ¦Ò¡C

Sub nn()

Dim startdate As Date
Dim temp As Date

startdate = "2010/1/1"
currentmonth = 1
startcell = 1

Dim firstMonday As Boolean
firstMonday = False

For i = 0 To 365

temp = startdate + i

If currentmonth <> Month(temp) Then
GoTo forend
End If

If Weekday(temp, vbMonday) = 1 Then
    If firstMonday = False Then
    firstMonday = True
    GoTo forend
    End If

    Cells(startcell, 1) = temp
    startcell = startcell + 1
    firstMonday = False
    currentmonth = currentmonth + 1
End If

forend:
Next

End Sub

TOP

ÁÂÁÂHsieh¤jªº«ü¾É
¦A½Ð°Ý¨C­Ó¤ëªº²Ä2­Ó§«ô¤@­n«ç»ò¼g?
ªì¾ÇªÌcolor

TOP

¦pªGfor i=549 to ³o­Ó°j°é­n¨C­Ói³£°õ¦æ¨ì
«Øij¶i¤Jdo Until¤§«e¥Î¤@ÅܼƦpr
r=i+1
Do Until Cells(r, 10) < Cells(r, 11)
Cells(r, 11)
r = r + 1
Loop
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD