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

¦p¦ó¦b«ü©wªº©w¸q¦WºÙ¤º«ü©w½d³ò¥[Á`©O¡H

¦p¦ó¦b«ü©wªº©w¸q¦WºÙ¤º«ü©w½d³ò¥[Á`©O¡H

¦U¦ì¤j¤j¦n¡G
   ¦b»ä­·´Á°Ý¡A¯¬ºÖ¤j®a³£¯à¥­¦w¶¶¤ß¡C
   ¤p§Ì¦³¤@°ÝÃD·Q½Ð°Ý¦b¤@¤u§@ªí¤º«ü©w¤F©w¸q¦WºÙ¬°¡G mySum
¨ä©w¸q¦WºÙ½d³ò¡G range("a1:b8")
³]¦³
a1:a8¤º®e¬°¡G ¦WºÙ,a,b,c,d,e,f,g
b1:b8¤º®e¬°¡G ¼Æ¶q,10,20,30,40,50,60,70

²{­n¦b«ü©wªºb9Äæ¦ì¥[Á`b2:b8

½Ð°Ý¨ä¤GºØ»yªk¬°¦ó©O¡H
  
»yªk¦p¤U¡G

Sub aa()
   
    Dim mSht As Worksheet
    Dim mRng As Range
    Dim mRng1 As Range
    Dim mRng2 As Range
   
    Set mSht = Worksheets(1)
   
    With mSht
        Set mRng = .Range("b9")
        Set mRng1 = Range("mysum").Cells(2, 2)
        'MsgBox mRng1.Address
        
        Set mRng2 = Range("mysum").Cells(8, 2)
        'MsgBox mRng2.Address
        
        
        'mRng.Formula = "=sum(mrng1 &":"& mrng2)"   '²Ä¤@ºØ»yªk
        'mRng.Formula= "sum(range("mysum").cells(2,2) &":"& range("mysum").cells(8,2))  '²Ä¤GºØ»yªk        
    End With        
        
End Sub

·PÁ¦U¦ì¤j¤j¡C

ÁÂÁ¦U¦ìª©¥D¤j¤j¡C

¤p§Ì¯u¬O¨ü¯q¨}¦h¡C

TOP

SUM¨ç¼Æ·|Á׶}¤å¦r
[B9] = "=SUM(mysum)"
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¤@¶}©l¤]·Q³o¼Ë²³æ¨Ç¡A¤£¹L¼Ó¥D¨â­Ó»yªk³£¬O¦bÀx¦s®æ¼g¤J¤½¦¡¡A¤~§ï¦¨¤½¦¡¡C

TOP

¦A´£¨Ñ¤@­Ó»yªk¡G
   = "=Sum(" & Application.Index([MySum], , 2).Address & ")"
oobird µoªí©ó 2010-9-20 15:30

¼Ó¥D»¡¹L: ¤p§Ì¦³¤@°ÝÃD·Q½Ð°Ý¦b¤@¤u§@ªí¤º«ü©w¤F©w¸q¦WºÙ¬°¡G mySum
¥iª½±µ¥Î¤u§@ªí¤½¦¡ [b9] = [Sum(Index(MySum, , 2))]

TOP

ÁÂÁ¦U¦ì¤j¤j¡C

¤p§Ì·|¦n¦n¬ã¨s¨Ã¥[À³¥Î¡C
·P®¦¦U¦ì¤j¤j¡I

TOP

¦A´£¨Ñ¤@­Ó»yªk¡G
  [b9] = "=Sum(" & Application.Index([MySum], , 2).Address & ")"

TOP

¦^´_ 3# dechiuan999
  1. Sub Ex()
  2.     Dim MySum As String
  3.     MySum = "a1:b8"
  4.     With Range(MySum).Columns(2)
  5.         .Cells(.Rows.Count + 1) = Application.Sum(.Offset(1).Resize(.Rows.Count - 1))
  6.     End With
  7. End Sub
½Æ»s¥N½X

TOP

With Range("mySum").Columns(2)
    [b9] = Application.Sum(.Value) - .Cells(1, 1)
End With
With Range("mySum").Columns(2)
    [b10] = Application.Sum(.Cells(2, 1).Resize(.Rows.Count - 1, 1))
End With

TOP

ÁÂÁª©¥D¤j¤j¡C

¤p§Ì¤Þ¥Î¤j¤jªº»yªk¤w¹F¦¨¶·¨D¡C
¥Ø«e©|¦b¬ã¨s¬O§_¦³¨ä¥L»yªk¥i¾A¥Î©O¡C

·P®¦ª©¥D¤j¤j¡I

TOP

        ÀR«ä¦Û¦b : ¶¢¤HµL¼Ö½ì¡A¦£¤HµL¬O«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD