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

[µo°Ý] ­pºâ­Ó§O­û¤u©ó¶g¤»¤W¯Z¦¸¼Æ

¦^´_ 4# hkyan
(ª`·N¡G¬°¤FÅý¤é´Á§ó¨ãµo®i©Ê, ¨è·N±N§Aªº¼Ë¥»ªº²Î­pÄæ¦ì½Õ¨ì³Ì¥ªÃä)
¦p¤U¹Ï, ¸Õ¸Õ¬Ý¡G
  1. Option Explicit
  2. Private Sub CommandButton1_Click()
  3.     Dim i, j, lastRow, lastCol As Integer
  4.     Dim ¶Z¤µ As Long
  5.     lastRow = [C65536].End(xlUp).Row
  6.     lastCol = [IV1].End(xlToLeft).Column
  7.     [A2].Resize(lastRow, 2) = ""
  8.     For i = 4 To lastCol
  9.         If Weekday(Cells(1, i), vbMonday) = 6 Then
  10.             ¶Z¤µ = Date - Cells(1, i)
  11.             For j = 2 To lastRow
  12.                 If Cells(j, i) <> "" Then
  13.                     Cells(j, 1) = Cells(j, 1) + 1   '¶g¤»¥[¯Z¤é¼Æ+1
  14.                     Cells(j, 2) = ¶Z¤µ
  15.                 End If
  16.             Next
  17.         End If
  18.     Next
  19. End Sub
½Æ»s¥N½X

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