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

[µo°Ý] ¦Û°Ê±a¤J¤é´Á

[µo°Ý] ¦Û°Ê±a¤J¤é´Á

·Q¸ß°Ý°²³]§Ú¦³ 50µ§¸ê®Æ ©ñ¦bA¦C  
§Ú¦bB¦C­n¦Û°Ê±a¤J¤é´Á ±q¦¸¤ë1¸¹¨ì30¸¹©Î31¸¹ ~
³Ì«á31¸¹¸ê®Æ¶ñ¤J«áÄ~Äò±q1¸¹¶}©l¶ñ~

¦p:   A        B
        1     10/1
        2     10/2
        3     10/3
       .....     ......
       31    10/31
       32    10/1

¤j­P¤W·Q§e²{³o¼Ë ¤£ª¾¹D¦³¨S¦³¿ìªk¥ÎVBA¼g¥X¨Ó?!

¦^´_ 1# toromru


    Private Sub Worksheet_Change(ByVal Target As Range)
    zr = Target.Row: zc = Target.Column
    If zc = 1 And Cells(zr, 2) = "" Then
      Dim lad, sfd As Date
      sfd = Application.EoMonth(Date, -2) 'sfd means StartFromDate
      lad = Application.Max(Columns(2), sfd)  'lad means LastActionDate
      Cells(zr, 2) = lad + 1
  End If
  End Sub

TOP

¦^´_ 1# toromru
  1. Option Explicit

  2. Public Sub ex()
  3. Dim I As Date
  4. Dim r%, dN%, j%
  5. r = 1
  6. dN = DateSerial(Year(Date), Month(Date) + 2, 0) - DateSerial(Year(Date), Month(Date) + 1, 1) + 1 '­pºâ¦¸¤ë¦³´X¤Ñ
  7. For j = 1 To Cells(Rows.Count, 1).End(xlUp).Row Step dN '
  8.         For I = DateSerial(Year(Date), Month(Date) + 1, 1) To DateSerial(Year(Date), Month(Date) + 2, 0) '¶ñ¼g¤é´Á
  9.             If Cells(r, 1) <> "" Then '¹J¨ìAÄ榳ªÅ¥Õ¡A´N°±¤î
  10.                 Cells(r, 2) = Format(I, "m/ d")
  11.                 r = r + 1
  12.             End If
  13.         Next
  14. Next
  15. End Sub
½Æ»s¥N½X

TOP

Sub TTDATE()
Dim D As Date, DC%
D = DateSerial(Year(Date), Month(Date) + 2, 0)  '¤U¤ë©³
DC = Day(D) '¤U¤ë¤Ñ¼Æ
For i = 1 To [A65536].End(xlUp).Row
¡@¡@Cells(i, 2) = D - DC + 1 + (i - 1) Mod DC
Next i
End Sub

TOP

¦^´_ 4# ­ã´£³¡ªL


    ·PÁ±z ¥¿±`¨Ï¥Î¤¤ : )

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD