¦b¦hÓ¤u§@ªí§@¥§¡Èpºâ¡A¥X²{RANGE¤èªk(_worksheetª«¥ó)¥¢±Ñ¤§¿ù»~
- ©«¤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 |
|
|
|
|
|
|