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

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

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

¤U¦Cµ{¦¡½X¦b­pºâ¤u§@ªí2®É¹B¦æ¥¿±`¡A
¦ý¬O¤@¸õ¨ì¤u§@ªí3­pºâ¥­§¡­È®É«o·|¿ù»~¡A
§ä¤F«Ü¤[¬Ý¤£¥X°ÝÃD©Ò¦b¡A
Àµ½Ð°ª¤â¥i¥H¸Ñ´b¡AÁÂÁÂ

    Dim col As Integer, p_today As Single, row As Integer
    For i = 2 To 9                           '¦b¤u§@ªí2¦Ü¤u§@ªí9§@­pºâ
        col = 3   
        Do While Sheets(i).Cells(1, col) <> ""
            If IsNumeric(Sheets(i).Cells(65536, col + 1).End(xlUp).Value) Then     '¦pªG¬O¼Æ¦r
                p_today = Sheets(i).Cells(65536, col + 1).End(xlUp).Value                '¦æ¸¹(col+1)  ¦s¦³¨C¤Ñªº¸ê®Æ
            Else
                p_today = 0
            End If
            Sheets(i).Activate
            Sheets(i).Cells(65536, col + 1).End(xlUp).Select
            row = Selection.row()
            avg = Application.Average(Range(Sheets(i).Cells(row - 259, col + 1), Sheets(i).Cells(row, col + 1)))
            Sheets(i).Cells(65536, col).Value = avg            '¦æ¸¹col  ©ñ¸m260¤Ñ¥­§¡­È
            col = col + 2
        Loop
    Next

¦^´_ 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

·P®¦ª©¥D
¤w¸g¥i¥H¶¶§Q¹B¦æ¤F!!:D

TOP

        ÀR«ä¦Û¦b : ¦³Ä@©ñ¦b¤ß¸Ì¡A¨S¦³¨­Åé¤O¦æ¡A¥¿¦p¯Ñ¥Ð¤£¼½ºØ¡A¬Ò¬OªÅ¹L¦]½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD