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

[µo°Ý] 2­Ó±ø¥óªº¥[Á`

¦^´_ 13# yliu
VBA¥Îloop¨Ó°µ±ø¥ó¥[Á`ªº®Ä²v¨Ã¤£·|¤ñSUMPRODUCT°ª

§Aªº¸ê®Æ¦³¦h¤Öµ§¡H
ss

TOP

¦^´_ 6# kimbal


    c_c_lai ´£¨Ñªºµ{¦¡½X¤w¥i¥H¨Ï¥Î¤F,ÁÂÁÂ!
    ¦Ósunnyso©Ò´£ªºSUMIFS½T¹ê¤]¬O¤@­Ó¤èªk.
learner

TOP

¦^´_ 5# sunnyso


    ÁÂÁÂsunnyso, ¸Õ¹L§A©Ò´£ªºSUMIFS, ¥i¥H¨Ï¥Î.·PÁÂ!
learner

TOP

¦^´_ 4# stillfish00


    ÁÂÁÂstillfish00, ¦]³oÀɮפ£¥u§Ú¨Ï¥Î, ©Ò¥H§Æ±æ¯à°÷¦Û°Ê¥[Á`.¤w±o¨ì¸Ñµª¤F,·PÁÂ!
learner

TOP

¦^´_ 9# c_c_lai


   ÁÂÁÂ c_c_lai,
   ¥i¥H¨Ï¥Î¤F, ·PÁÂ~
  ¦A½Ð°Ý¤@¤U,   
.Cells(lngVlookupRow, Chr(79 + Int(lngCurrenMonth / 3.2))) = .Cells(lngVlookupRow, Chr(79 + Int(lngCurrenMonth / 3.2))) + lngCurrValue  '

°£¥H3.2 ªº§@¥Î¬O¤°»ò?
learner

TOP

¦pªþ¥ó¡G
¨â­Ó±ø¥óªº¥[Á`.rar (20.85 KB)

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2013-5-31 19:55 ½s¿è

½Ð±N 4 §ï¦¨ 3.2
  1.                     .Cells(lngVlookupRow, Chr(79 + Int(lngCurrenMonth / 3.2))) = .Cells(lngVlookupRow, Chr(79 + Int(lngCurrenMonth /3.2))) + lngCurrValue
½Æ»s¥N½X

TOP

¦^´_  kimbal
ÁÂÁÂkimbal.
¦ý¥X²{°õ¦æ¶¥¬q¿ù»~¡¦13¡¦: «¬ºA¤£²Å¦X
°»¿ù¦b: With Sheets("Á`ªí").Cells( ...
yliu µoªí©ó 2013-5-31 12:30

¦^´_ 2# kimbal
¤£¦n·N«ä¡A§Úµy·L²K¥[¤F´X¦æ¡A§Æ±æ±zµ¥¯à¯º¯Ç¡I
  1. Private Sub Ex()
  2.     Dim rowcnt As Long, i As Long
  3.     Dim lngVlookupRow As Long, lngCurrenMonth As Long, lngCurrValue As Long

  4.     Application.ScreenUpdating = False
  5.     Application.Calculation = xlCalculationManual

  6.     '  ²M²z¼ƾÚ
  7.     Sheets("Á`ªí").Activate
  8.     Sheets("Á`ªí").Range("A3").CurrentRegion.Offset(1, 1).Clear


  9.     Sheets("­ì©l¸ê®Æ").Activate
  10.     With Sheets("­ì©l¸ê®Æ")
  11.         rowcnt = .Cells(1, 1).CurrentRegion.Rows.Count
  12.         For i = 2 To rowcnt
  13.             lngCurrenMonth = 0
  14.             If IsDate(.Cells(i, 2)) Then
  15.                 lngCurrenMonth = Month(.Cells(i, 2))                                               '  ·í¦æ¤ë¥÷
  16.             End If
  17.             
  18.             If lngCurrenMonth > 0 And Not (IsError(Application.Match(.Cells(i, 1), Sheets("Á`ªí").Range("A:A"), 0))) Then
  19.                 lngVlookupRow = Application.Match(.Cells(i, 1), Sheets("Á`ªí").Range("A:A"), 0)    '  ·í¦æÃþ«¬¦bÁ`ªí¦æ¼Æ
  20.                 lngCurrValue = .Cells(i, 3)
  21.                 With Sheets("Á`ªí")
  22.                     .Cells(lngVlookupRow, lngCurrenMonth + 1).Value = .Cells(lngVlookupRow, lngCurrenMonth + 1).Value + lngCurrValue                       '  ©ñ¼Æ¾Ú¨ìÁ`ªí¤W
  23.                     .Cells(lngVlookupRow, "N") = .Cells(lngVlookupRow, "N") + lngCurrValue
  24.                     .Cells(lngVlookupRow, Chr(79 + Int(lngCurrenMonth / 4))) = .Cells(lngVlookupRow, Chr(79 + Int(lngCurrenMonth / 4))) + lngCurrValue
  25.                 End With
  26.             End If
  27.         Next
  28.     End With
  29.    
  30.     With Sheets("Á`ªí")
  31.         rowcnt = .[A3].End(xlDown).Row
  32.         For i = 2 To 18
  33.             .Cells(rowcnt, i) = WorksheetFunction.Sum(.Range(Chr(64 + i) & 4 & ":" & Chr(64 + i) & (rowcnt - 1)))
  34.         Next i
  35.     End With
  36.    
  37.     Application.Calculation = xlCalculationAutomatic
  38.     Application.ScreenUpdating = True
  39. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# yliu


    ¥i§_´£¨Ñ¤@¤UEXCEL?

¥t¥~¤]·|«Øij¥ÎPIVOTTABLE ©MSUMIFS
VBA LOOP«Ü¦h±¡ªp¤]¬O¤ñ¤½¦¡ºCªº.
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¦^´_ 1# yliu

¥i¥H¦Ò¼{¥Î SUMIFS ¨Ó¥N´À SUMPRODUCT¡A ¦]爲SUMIFS§ó¦³®Ä²v
ss

TOP

        ÀR«ä¦Û¦b : ¦h°µ¦h±o¡C¤Ö°µ¦h¥¢¡C
ªð¦^¦Cªí ¤W¤@¥DÃD