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

¦b¦h­Ó¤u§@ªí§@¥­§¡­È­pºâ¡A¥X²{RANGE¤èªk(_worksheetª«¥ó)¥¢±Ñ¤§¿ù»~

¦^´_ 1# tsunamix03

§A³oµ{¦¡½X¬O§_¦b  Sheets(2)¤u§@ªíª«¥ó¼Ò²Õ¸Ì!

¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3. Dim col As Integer, p_today As Single, R As Integer, i As Integer, avg As Double
  4.     For i = 2 To 9                           '¦b¤u§@ªí2¦Ü¤u§@ªí9§@­pºâ
  5.         col = 3
  6.         With Sheets(i)
  7.             Do While .Cells(1, col) <> ""
  8.                 If IsNumeric(.Cells(65536, col + 1).End(xlUp).Value) Then     '¦pªG¬O¼Æ¦r
  9.                     p_today = .Cells(65536, col + 1).End(xlUp).Value                '¦æ¸¹(col+1)  ¦s¦³¨C¤Ñªº¸ê®Æ
  10.                 Else
  11.                     p_today = 0
  12.                 End If
  13.                 ' Sheets(i).Activate
  14.                 ' Sheets(i).Cells(65536, col + 1).End(xlUp).Select
  15.                 R = .Cells(65536, col + 1).End(xlUp).Row
  16.                 avg = Application.Average(.Range(.Cells(R - 259, col + 1), .Cells(R, col + 1)))
  17.                 .Cells(65536, col).Value = avg            '¦æ¸¹col  ©ñ¸m260¤Ñ¥­§¡­È
  18.                 col = col + 2
  19.             Loop
  20.         End With
  21.     Next
  22. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : °ß¨ä´L­«¦Û¤vªº¤H¡A¤~§ó«i©óÁY¤p¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD