- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-9-27 10:58 ½s¿è
¦^´_ 16# spermbank
¥i¥H§ï¦¨ Set CsvRange = OpCsv.Sheets(1).Columns(1).SpecialCells(xlCellTypeConstants).Offset(1)
Range ("A:A") =>Columns("A:A") ³æÄæ Columns(1)
Range ("A:B") >= Columns("A:B")
n«ç»ò¥ý§â²Ä6Äæ(Volume)©Ò¦³È³£¥ý°£¥H1000¦A¦s¤JSheet2©O?
AR = Application.Transpose(CsvRange) ->°}¦C±qÀx¦s®æ¾É¤J騃 ¨C¤@ºû«×ªº¤U³£¬O±q1 ¶}©l ->For i = 1 To UBound(AR)- AR = Application.Transpose(CsvRange)
- For i = 1 To UBound(AR)
- AR(i) = AR(i) / 1000
- Next
- TheRow.Offset(, 2).Resize(, CsvRange.Rows.Count) = AR
½Æ»s¥N½X ¦^´_ 17# spermbank - Sub Ex()
- Dim x As Double, i As Double, AA()
- x = Application.WorksheetFunction.CountA(Range("A:A")) 'Äæ¦ì¦³È½d³òpºâ
- ReDim AA(2 To x, 1 To 4) '2 To x-> ²Ä¤@ºû «ü©w±q 2 ¨ì X
- '1 To 4-> ²Ä¤Gºû «ü©w±q 1 ¨ì 4
- For i = 2 To x '°t¦X°}¦Cºû«×ªº¤W¤U
- With Application
- 'With Application.WorksheetFunction '¥¿²Î¼gªk
- AA(i, 1) = .Sum(Cells(i, 3).Resize(, 5)) / 5
- AA(i, 2) = .Average(Range("A" & i).Resize(, 20)) '20¤é-20ÓÀx¦s®æ¤¤ªº¼ÆÈ¥§¡
- AA(i, 3) = .Average(Range("A" & i).Resize(, 60)) '60¤é
- AA(i, 4) = .Average(Range("A" & i).Resize(, 120)) '120¤é
- End With
- Next
- End Sub
- Sub Ex1()
- x = Application.WorksheetFunction.CountA(Range("A:A")) 'Äæ¦ì¦³È½d³òpºâ
- Dim AA(2000, 3) '2000-> ²Ä¤@ºû 0-2000 ¦@20001Ó
- '3 -> ²Ä¤Gºû 0-3 ¦@4Ó
- For i = 2 To x
- AA(i - 2, 0) = (Cells(i, 3) + Cells(i, 4) + Cells(i, 5) + Cells(i, 6) + Cells(i, 7)) / 5
- AA(i - 2, 1) = Application.WorksheetFunction.Average(Range("A" & i & ": V" & i)) '20¤é-20ÓÀx¦s®æ¤¤ªº¼ÆÈ¥§¡
- AA(i - 2, 2) = Application.WorksheetFunction.Average(Range("A" & i & ": BJ" & i)) '60¤é
- AA(i - 2, 3) = Application.WorksheetFunction.Average(Range("A" & i & ": DR" & i)) '120¤é
- Next
- End Sub
½Æ»s¥N½X |
|