Results 1 to 13 of 13

Looking for a way to sum a column with variable length

Threaded View

  1. #1
    Registered User
    Join Date
    05-12-2020
    Location
    USA
    MS-Off Ver
    2010
    Posts
    10

    Looking for a way to sum a column with variable length

    Hi All,

    I am looking for a way to sum a column with variable length. I cannot use (xlUp) because there is other data in cells in this column below the range that I need summed.The range will always start in cell "AA8". So far I have the following code:

    Sub first_total_row()
    
    Dim Range_1 As Range
    Range("AA8").Select
    Range_1 = Range(Selection, Selection.End(xlDown))
    Range("AA8").End(xlDown).Select
     Selection.Offset(1, 0).Select
    Selection = Sum.Range_1
      
    End Sub
    I am not sure how to make this dynamic so that it will sum every cell in column "AA" down to the last cell before the first blank, and then, in that first blank, place the sum of the preceding cells.

    Thank you.
    Last edited by sg1962; 05-12-2020 at 01:09 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Unlocking numerous check boxes in a single column, variable column length
    By PeteSpec in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-12-2019, 03:54 PM
  2. How to fill a column with data if the column has a variable length?
    By flyingdutch06 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2016, 09:02 AM
  3. Replies: 6
    Last Post: 04-14-2012, 04:07 AM
  4. Last Cell in a Variable Length Column
    By akj375 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2011, 10:25 PM
  5. [SOLVED] Autosum a variable column length using VB
    By sid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2006, 11:10 AM
  6. Sum a Column of Variable length
    By Chris G in forum Excel General
    Replies: 4
    Last Post: 11-07-2005, 08:30 AM
  7. [SOLVED] Sum a column of variable length?
    By Brian in forum Excel General
    Replies: 5
    Last Post: 02-03-2005, 11:06 AM

Tags for this Thread

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