+ Reply to Thread
Results 1 to 3 of 3

Totaling Columns

Hybrid View

  1. #1
    Registered User
    Join Date
    10-23-2006
    Posts
    84

    Totaling Columns

    How do I find column values using vba please.

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Hi its done like this:

    Sub SumIt()
    
        Range("E1").Select ''''select the cell where you would like the results
        ActiveCell.FormulaR1C1 = "=SUM(C[-4])" ''''this example says that E1 will = the sum of a column -4 away
                                               ''''so we start at E -1=D -2=C etc if you took away the - then the
    End Sub                                      ''''result would be the sum of column I
    Regards,
    Simon
    Last edited by Simon Lloyd; 11-01-2006 at 01:53 AM.

  3. #3
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    I would just use

    Activecell.column

    This will return the number of the column starting from 1 for A, 2 for B etc

+ Reply to Thread

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