Results 1 to 4 of 4

Thread: How do i do autosum in excel

  1. #1

    Thread Starter
    Member
    Join Date
    May 2004
    Location
    Where i am
    Posts
    38

    How do i do autosum in excel

    How do i do autosum in excel i tried recording it but i got

    Range("J22").Select
    ActiveCell.FormulaR1C1 = "=SUM(R[-20]C:R[-1]C)"

    But the range i have to add changes in size could anyone help???

  2. #2
    Junior Member llkhoutx's Avatar
    Join Date
    Jan 2005
    Location
    Houston, TX
    Posts
    19

    Re: How do i do autosum in excel

    Just dynamically build the range, i.e.


    ActiveCell.FormulaR1C1 = "=SUM(R[-" & AComputedValue & "]C:R[-" & AnotherComptedValueOR1" & "]C)"

  3. #3
    Fanatic Member ZeBula8's Avatar
    Join Date
    Oct 2002
    Posts
    548

    Re: How do i do autosum in excel

    Could always use a more simple approach like this:


    ActiveCell.Formula = "=SUM(C2:C6)"

  4. #4
    Addicted Member
    Join Date
    Mar 2005
    Posts
    174

    Re: How do i do autosum in excel

    Suppose the range i had to add is A2:BA2 then wheather tha same formula is applicable.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width