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

¦p¦ó¥Î¥¨¶°¦b³Ì«á¤@ÄæÅã¥Ü­pºâÁ`©M©O??

¦p¦ó¥Î¥¨¶°¦b³Ì«á¤@ÄæÅã¥Ü­pºâÁ`©M©O??

for example:

Á`¦@½d³ò¬°A1:H40

§Ú·Q¦b²ÄG41ªº¦a¤èÅã¥ÜG1¥[¨ìG40ªºÁ`©M¡A¦pªG¤£¥Îsum(G1:G40) ,¦Ó§ï¥Î¥¨¶°¨Ó¼g¸Ó¦p¦ó¼g©O??

¦^´_ 1# willy1205
  1. [G41].Value = Application.WorksheetFunction.Sum([G1:G40])
½Æ»s¥N½X

TOP

Dim cell As Range
Set av1 = Range("G1:G40")
  sumi = 0
    For Each cell In av1
  sumi = sum+i  cell.Value
    Next cell
'sumi§Y¬°G1:G40ªº¥[Á`

TOP

¦^´_ 3# IQ2008
¼Ó¥D ¤]¥i¯à¬O­n¦p¦¹ªº
  1. Option Explicit
  2. Sub Ex()
  3.     Dim i As Integer
  4.     With [A1: H40]
  5.         For i = 1 To .Columns.Count
  6.             .Cells(.Rows.Count + 1, i) = Application.Sum(.Columns(i))
  7.         Next
  8.     End With
  9. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

©êºp, ¦³¤@¦æ¦³»~,§ó¥¿sumi = sum+i  cell.Value ¦p¤U

Dim cell As Range
Set av1 = Range("G1:G40")
  sumi = 0
    For Each cell In av1
  sumi = sumi  +cell.Value
    Next cell
'sumi§Y¬°G1:G40ªº¥[Á`

TOP

        ÀR«ä¦Û¦b : ¡i°µ¤Hªº¶}©l¡j¨C¤@¤Ñ³£¬O¬G¤Hªº¶}©l¡A¨C¤@­Ó®É¨è³£¬O¦Û¤vªºÄµ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD