- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 6# olisun
¸Õ¸Õ¬Ý- Private Sub Ex()
- Dim d As Date, W%, AD, Rng As Range, i%, ii%
- d = ¤u§@ªí1.[E2]
- W = Weekday(d, vbMonday) '¶g¤@¬°²Ä1¤Ñ
- With ¤u§@ªí1
- .[j13] = "¥»¶g " & d - (W - 1) & " ** " & d + (5 - W)
- Set Rng = .[j15:l26]
- For i = 0 To Rng.Columns.Count - 1
- For ii = 1 To Rng.Rows.Count
- AD = Evaluate("SUMIF(" & ¤u§@ªí17.[A:A].Address(, , , 1) & ",""<=" & d + (5 - W) & """, " & ¤u§@ªí17.Columns(1 + (i * 12) + ii).Address(, , , 1) & ")")
- AD = AD - Evaluate("SUMIF(" & ¤u§@ªí17.[A:A].Address(, , , 1) & ",""<" & d - (W - 1) & """, " & ¤u§@ªí17.Columns(1 + (i * 12) + ii).Address(, , , 1) & ")")
- Rng.Cells(ii, i + 1) = AD
- Next
- Next
- Set Rng = .[M15:O15]
- For i = 1 To Rng.Columns.Count
- AD = Evaluate("SUMIF(" & ¤u§@ªí18.[A:A].Address(, , , 1) & ",""<=" & d + (5 - W) & """, " & ¤u§@ªí18.Columns(1 + i).Address(, , , 1) & ")")
- AD = AD - Evaluate("SUMIF(" & ¤u§@ªí18.[A:A].Address(, , , 1) & ",""<" & d - (W - 1) & """, " & ¤u§@ªí18.Columns(1 + i).Address(, , , 1) & ")")
- Rng.Cells(1, i) = AD
- Next
- End With
- End Sub
½Æ»s¥N½X |
|