Results 1 to 10 of 10

Macro to Sum ALL the rows in a column - any number of rows

Threaded View

  1. #1
    Registered User
    Join Date
    04-17-2013
    Location
    Vallejo, CA, USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Macro to Sum ALL the rows in a column - any number of rows

    I need a macro (at top of the column), to SUM all of the rows below.

    --------------------------------------------------------------------------------------------

    My keystrokes are:

    =Sum(
    {Down}
    {CTRL}+{SHIFT}+{DOWN}      ' these keystrokes select all contiguous rows down (any number)
    )
    {RIGHT}
    --------------------------------------------------------------------------------------------

    Excel 2010 converts that to:

    Macro1()
    
           Range("A1").Select
           ActiveCell.FormulaR1C1 = "=SUM(R[2]C:R[4478]C)"
           Range("B1").Select
    
    End Sub
    --------------------------------------------------------------------------------------------

    How do I get VBA to sum ALL rows and not just (A2:A4478) ?
    Last edited by RM-Vallejo; 04-20-2013 at 05:08 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1