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

[µo°Ý] Q15:Q26¬°E2©Ò¿é¤J¤é´Á¥H«eªºÁ`©M(¤w¸Ñ¨M)

¬d¸ß²Î­p¥H©P¬°³æ¦ì¡A¯uªº¦³Ãø«×

¿é¤J¤é´Á(¤£¤@©w¬O·í¤éªº¤é´Á)¡A¥»¤é©Ò¬d¸ßªº§Y¬O©Ò¿é¤Jªº¤é´Á¡A§Ú·Q­nªº¬O¦p¦ó¥»¶gªº²Î­p
¿é¤J¬d¸ß¤é´Á¬°8/20¡A«h¥»©Pªº²Î­p¬°
8/16(¤@)¡ã8/20(¤­)¸Ó¶gªº²Ö­p
¦pªG¿é¤J¬d¸ß¨ä¬°8/10¡A«h¥»©Pªº²Î­p¬°
8/9(¤@)¡ã8/10(¤G)¸Ó¶gªº²Ö­p

¤éªí8-25.rar (113.2 KB)

TOP

¦^´_ 1# olisun

§A¥i¥Hµ½¥Î Weekday() ¨ç¼Æ(®M¥Î¤è¦¡½Ð§äExcel VBAªº»¡©ú)§ä¨ì©Ò¿é¤J¤é´Áªº¬P´Á¼Æ,
¦A¥H¸Ó¬P´Á¼Æ©¹«e±Àºâ¥X¸Ó¶g¶g¤@ªº¤é´Á,
³o¼Ë§A·Q­nªº¸ê®Æ´N¤£Ãø§ä¨ì¤F³á.

TOP

¦^´_  olisun

§A¥i¥Hµ½¥Î Weekday() ¨ç¼Æ(®M¥Î¤è¦¡½Ð§äExcel VBAªº»¡©ú)§ä¨ì©Ò¿é¤J¤é´Áªº¬P´Á¼Æ,
¦A¥H ...
luhpro µoªí©ó 2010-8-27 22:56



    ¥i¥H¦A©ú½T¤@ÂI¶Ü

TOP

Dim wkd%, wk1
  
  '©Ò¿é¤J¤é´Áªº¬P´Á¼Æ
  wkd = Weekday(Range("E2"), vbMonday)
  '¸Ó¶g¬P´Á¤@ªº¤é´Á
  wk1 = DateAdd("d", -(wkd - 1), Range("E2"))

³o¼Ë¦³¤F§A­nªº "¬P´Á¤@" ªº¤é´Á »P ©Ò¿é¤Jªº¤é´Á.

TOP

¦^´_ 3# olisun
  1. Sub Ex()
  2.     Dim d As Date, W%
  3.     d = "2010/8/20"
  4.     W = Weekday(d, vbMonday)  '¶g¤@¬°²Ä1¤Ñ
  5.     MsgBox "¥»¶g²Ä1¤Ñ " & d - (W - 1) & "   **   ¥»¶g²Ä5¤Ñ  " & d + (5 - W)
  6. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ olisun ©ó 2010-8-28 12:16 ½s¿è

­Ye2¿é¤Jªº¤é´Á¬O2010/8/20
«h
j15=sheets(¬£§¨³ø«Å¶Ç¨®)¤¤¡Ab7+b8+b9+b10+b11=5¥÷

TOP

¦^´_ 6# olisun
¸Õ¸Õ¬Ý
  1. Private Sub Ex()
  2.     Dim d As Date, W%, AD, Rng As Range, i%, ii%
  3.     d = ¤u§@ªí1.[E2]
  4.     W = Weekday(d, vbMonday)  '¶g¤@¬°²Ä1¤Ñ
  5.     With ¤u§@ªí1
  6.         .[j13] = "¥»¶g  " & d - (W - 1) & "  **   " & d + (5 - W)
  7.         Set Rng = .[j15:l26]
  8.         For i = 0 To Rng.Columns.Count - 1
  9.             For ii = 1 To Rng.Rows.Count
  10.                 AD = Evaluate("SUMIF(" & ¤u§@ªí17.[A:A].Address(, , , 1) & ",""<=" & d + (5 - W) & """, " & ¤u§@ªí17.Columns(1 + (i * 12) + ii).Address(, , , 1) & ")")
  11.                 AD = AD - Evaluate("SUMIF(" & ¤u§@ªí17.[A:A].Address(, , , 1) & ",""<" & d - (W - 1) & """, " & ¤u§@ªí17.Columns(1 + (i * 12) + ii).Address(, , , 1) & ")")
  12.                 Rng.Cells(ii, i + 1) = AD
  13.             Next
  14.         Next
  15.         Set Rng = .[M15:O15]
  16.         For i = 1 To Rng.Columns.Count
  17.             AD = Evaluate("SUMIF(" & ¤u§@ªí18.[A:A].Address(, , , 1) & ",""<=" & d + (5 - W) & """, " & ¤u§@ªí18.Columns(1 + i).Address(, , , 1) & ")")
  18.             AD = AD - Evaluate("SUMIF(" & ¤u§@ªí18.[A:A].Address(, , , 1) & ",""<" & d - (W - 1) & """, " & ¤u§@ªí18.Columns(1 + i).Address(, , , 1) & ")")
  19.             Rng.Cells(1, i) = AD
  20.         Next
  21.     End With
  22. End Sub
½Æ»s¥N½X

TOP

¦^´_  olisun
¸Õ¸Õ¬Ý
GBKEE µoªí©ó 2010-8-28 11:50



    ¦pªG¥H2010/8/20´ú¸Õ¬Ookªº¡A¦ý¬O¦pªG¥H2010/8/15´ú¸Õ¡Aµª®×¬O¿ùªº?

TOP

¦^´_ 8# olisun
¿é¤J¬d¸ß¤é´Á¬°8/20¡A«h¥»©Pªº²Î­p¬°    8/16(¤@)¡ã8/20(¤­) ¸Ó¶gªº²Ö­p
¦pªG¿é¤J¬d¸ß¨ä¬°8/10¡A«h¥»©Pªº²Î­p¬°  8/9(¤@)¡ã8/10(¤G)  ¸Ó¶gªº²Ö­p

§A¤£¬O­n¤@¾ã¶gªº¤é´Á¶¡¹j  ¦Ó¬O­n·í¶g²Ä¤@¤Ñ¨ì«ü©w¤é´Áªº¤Ñ¼Æ  ±Nµ{¦¡½X¬õ¦â³¡¤À§R±¼´N¥i¥H
10.                AD = Evaluate("SUMIF(" & ¤u§@ªí17.[A:A].Address(, , , 1) & ",""<=" & d + (5 - W) & """, " & ¤u§@ªí17.Columns(1 + (i * 12) + ii).Address(, , , 1) & ")")

11.                AD = AD - Evaluate("SUMIF(" & ¤u§@ªí17.[A:A].Address(, , , 1) & ",""<" & d - (W - 1) & """, " & ¤u§@ªí17.Columns(1 + (i * 12) + ii).Address(, , , 1) & ")")

TOP

[µo°Ý] Q15:Q26¬°E2©Ò¿é¤J¤é´Á¥H«eªºÁ`©M(¤w¸Ñ¨M)

¥»©«³Ì«á¥Ñ olisun ©ó 2010-8-31 00:25 ½s¿è

Q1526¬°E2©Ò¿é¤J¤é´Á¥H«eªºÁ`©M
¸Ó«ç»ò³]©O?

¤éªí8-28.rar (111.46 KB)

        ÀR«ä¦Û¦b : ¦³¤ß´N¦³ºÖ¡A¦³Ä@´N¦³¤O¡A¦Û³yºÖ¥Ð¡A¦Û±oºÖ½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD