¦b¦hÓ¤u§@ªí§@¥§¡Èpºâ¡A¥X²{RANGE¤èªk(_worksheetª«¥ó)¥¢±Ñ¤§¿ù»~
- ©«¤l
- 16
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 68
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2015-2-26
- ³Ì«áµn¿ý
- 2021-10-4
|
¦b¦hÓ¤u§@ªí§@¥§¡Èpºâ¡A¥X²{RANGE¤èªk(_worksheetª«¥ó)¥¢±Ñ¤§¿ù»~
¤U¦Cµ{¦¡½X¦bpºâ¤u§@ªí2®É¹B¦æ¥¿±`¡A
¦ý¬O¤@¸õ¨ì¤u§@ªí3pºâ¥§¡È®É«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 |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 1# tsunamix03
§A³oµ{¦¡½X¬O§_¦b Sheets(2)¤u§@ªíª«¥ó¼Ò²Õ¸Ì!
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim col As Integer, p_today As Single, R As Integer, i As Integer, avg As Double
- For i = 2 To 9 '¦b¤u§@ªí2¦Ü¤u§@ªí9§@pºâ
- col = 3
- With Sheets(i)
- Do While .Cells(1, col) <> ""
- If IsNumeric(.Cells(65536, col + 1).End(xlUp).Value) Then '¦pªG¬O¼Æ¦r
- p_today = .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
- R = .Cells(65536, col + 1).End(xlUp).Row
- avg = Application.Average(.Range(.Cells(R - 259, col + 1), .Cells(R, col + 1)))
- .Cells(65536, col).Value = avg '¦æ¸¹col ©ñ¸m260¤Ñ¥§¡È
- col = col + 2
- Loop
- End With
- Next
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 16
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 68
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2015-2-26
- ³Ì«áµn¿ý
- 2021-10-4
|
·P®¦ª©¥D
¤w¸g¥i¥H¶¶§Q¹B¦æ¤F!!:D |
|
|
|
|
|
|