+ Reply to Thread
Results 1 to 3 of 3

Using Autosum at the bottom of a variable range

  1. #1
    Registered User
    Join Date
    03-08-2008
    Location
    Rhode Island
    MS-Off Ver
    2007
    Posts
    25

    Using Autosum at the bottom of a variable range

    Hello,

    I have an Access query that returns 2 columns of data that will vary in terms of the # of rows each day. I export this to Excel and created a macro to perform the formatting I want but how can I tell Excel to find the bottom row entry and then offset 1 row below and perform Autosum?

    Thanks in advance

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello MGT2000,

    Welcome to the Forum!

    The code sample belows shows how to find the end of a column using VBA code. Just change the column letter to the one you are using and the starting row. Here "A" and 2 is used.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    03-08-2008
    Location
    Rhode Island
    MS-Off Ver
    2007
    Posts
    25
    Thanks for your help Leith. The only trouble with the code was the set range variable, the cells were set to last row + 1 which created a circular reference with the autosum, other than that it worked great.

    Chris

+ 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