+ Reply to Thread
Results 1 to 2 of 2

Similar SUM Formula w/ Variable Rows

  1. #1
    Registered User
    Join Date
    04-11-2011
    Location
    Midwest USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Similar SUM Formula w/ Variable Rows

    I'm trying to use the same basic SUM formula down an entire column...


    Please Login or Register  to view this content.
    Column D will always be the SUM formula column, but the formula will change to:
    ActiveSheet.Range("D3").Formula = "=SUM(A3,B3,C3)"
    ActiveSheet.Range("D4").Formula = "=SUM(A4,B4,C4)"
    ActiveSheet.Range("D5").Formula = "=SUM(A5,B5,C5)"
    ActiveSheet.Range("D6").Formula = "=SUM(A6,B6,C6)"
    etc.

    Blank rows are included in the spreadsheet and I'd like to be able stop including the SUM formula on the last row with data. Is there an easy way to write this in VBA without having to code in every range?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,496

    Re: Similar SUM Formula w/ Variable Rows

    Please Login or Register  to view this content.


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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