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

­n¦p¦ó¤£¨Ï¥ÎVBA¨Ì¤ë¥÷°µ²Î­p

­n¦p¦ó¤£¨Ï¥ÎVBA¨Ì¤ë¥÷°µ²Î­p

¦pÃD¡A½Ð°Ý­n¦p¦ó¨Ì·Ó¤ë¥÷°µ²Î­p¨ì¤U¤èÄæ¦ì¤¤ªº¥ó¼Æ¤Î¤Ñ¼Æ???
ªþÀÉ
«È¤á©ê«è¡B«È¶D¡B°h³f³B²z¤Ñ¼Æ²Î­pªí.rar (12.83 KB)

¥»©«³Ì«á¥Ñ luhpro ©ó 2021-3-6 05:09 ½s¿è
¦pÃD¡A½Ð°Ý­n¦p¦ó¨Ì·Ó¤ë¥÷°µ²Î­p¨ì¤U¤èÄæ¦ì¤¤ªº¥ó¼Æ¤Î¤Ñ¼Æ???
ªþÀÉ
s13030029 µoªí©ó 2021-3-5 09:52

¨Ì§A©ÒÁ|ªº¨Ò¤l§Ú²q´ú¬Y¤ë¥÷¸g­pºâ«áªº¤Ñ¼Æ¬O¥­§¡¤Ñ¼Æ : (ÂIÀ» "¶}©l²Î­p" «ö¶s´N·|¶}©l­pºâ)
===== Sheet1 =====
  1. Private Sub CommandButton1_Click()
  2.   Dim iI%, iMon%
  3.   Dim lRow&

  4.   With Sheets("³B²z¤Ñ¼Æ²Î­pªí")
  5.     .Range(.[B22], .[M23]) = 0 ' ²Î­p¸ê®ÆÂk¹s
  6.   End With
  7.   Application.OnTime Now + TimeValue("00:00:01"), "SumData" ' ©µ¿ð1¬í¥H¯à©úÅã¬Ý¥X¸ê®Æ¦³Âk¹s
  8. End Sub
½Æ»s¥N½X
=====  Module1=====
  1. Public Sub SumData()
  2.   With Sheets("³B²z¤Ñ¼Æ²Î­pªí")
  3.     For lRow = 5 To 19 ' ²Î­p­Ó¤ë¥÷¤Ñ¼Æ©M¥ó¼Æ
  4.       With .Cells(lRow, 1)
  5.         If .Value = "" Then Exit For
  6.         iMon = Month(.Value)
  7.       End With
  8.       For iI = 0 To 1
  9.         .Cells(22 + iI, iMon + 1) = .Cells(22 + iI, iMon + 1) + .Cells(lRow, 9 + iI)
  10.       Next
  11.     Next
  12.     For iI = 2 To 13 ' ­pºâ¥­§¡¤Ñ¼Æ
  13.       If .Cells(23, iI) > 0 Then .Cells(22, iI) = .Cells(22, iI) / .Cells(23, iI)
  14.     Next
  15.   End With
  16. End Sub
½Æ»s¥N½X
«È¤á©ê«è¡B«È¶D¡B°h³f³B²z¤Ñ¼Æ²Î­pªí-ans.zip (15.84 KB)

TOP

        ÀR«ä¦Û¦b : ¤p¨Æ¤£°µ¡B¤j¨ÆÃø¦¨¡C
ªð¦^¦Cªí ¤W¤@¥DÃD