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

¦p¦ó³]©w¦Û°Ê¥[Á`vbaµ{¦¡

¦p¦ó³]©w¦Û°Ê¥[Á`vbaµ{¦¡

½Ð±Ð¦p¤U¹Ï©Ò¥Üvbaµ{¦¡«ç¼Ë¼g?
ÁÂÁÂ !!!

¦^´_ 1# agwhk
  1.     Sub test()
  2. Dim firstPos As Long, currRow As Long, lastrow As Long
  3. Dim startRng As Range

  4.    
  5.     Set startRng = ActiveSheet.Range("B3")
  6.    
  7.     lastrow = Range("B65536").End(xlUp).Row + 1
  8.     currRow = 0
  9.    
  10.     Do
  11.         With startRng
  12.             If UCase(Left(.Offset(currRow, 0).Offset(0, -1), 8)) = "SUBTOTAL" Then
  13.                 .Offset(currRow, 0).Value = Application.WorksheetFunction.Sum(Range(.Offset(firstPos, 0), .Offset(currRow - 1, 0)))
  14.                 firstPos = currRow + 1
  15.             End If
  16.         End With
  17.         currRow = currRow + 1
  18.         
  19.     Loop While startRng.Offset(currRow).Row <= lastrow

  20. End Sub
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

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

TOP

ÁÂÁ kimbal ¤j­ô , ¥¿¬O§Ú¶·­nªºµ{¦¡«D±`·PÁÂ!!!

TOP

        ÀR«ä¦Û¦b : ±o²z­nÄǤH¡A²zª½­n®ð©M¡C
ªð¦^¦Cªí ¤W¤@¥DÃD