+ Reply to Thread
Results 1 to 6 of 6

ListObject TotalsRowRange to sum - Autofill

  1. #1
    Forum Contributor
    Join Date
    09-17-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    117

    ListObject TotalsRowRange to sum - Autofill

    I'm trying to set a selected portion of the TotalsRowRange to sum from column 6 to the last column.

    This is the recorded code which uses the column headings which does the job, however these names will change and so will the table's size:
    Please Login or Register  to view this content.
    I wish to do this using the Cells property where I can claculate what the last row and column will be but can't get it to work.

    I've got the correct count of lrow (9) and lastcol (58) and have tried and failed with the following:
    Please Login or Register  to view this content.
    So the addresses for source cell is correct and the destination autofill range is correct, however it doesn't seem to do anything.

    What's missing?

  2. #2
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: ListObject TotalsRowRange to sum - Autofill

    i don't see anything obvious... have you tried stepping through the code (pressing f8) to see what each step does? when you say it doesn't seem to do anything what do you mean by that?

    can you upload a sample workbook?
    Hope I could help - if your post has been solved don't forget to mark it as such.

    Clicking the * below is a great way to say thanks!

    "Drowning in 10 feet of water isn?t any different than drowning in a million feet. And if you can swim, it doesn?t matter how deep the ocean is. At some level, once you realize you?re in water that?s too deep to stand, you have to have a very different approach," - Joi Ito

  3. #3
    Forum Contributor
    Join Date
    09-17-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    117

    Re: ListObject TotalsRowRange to sum - Autofill

    Example attached - had to remove most of the sheets as sensitive data on but shouldn't affect functionality of the troublesome table.

    The module in question is 'Project_data' and 'Module1' has the recorded Macro.

    I did step through the code (most of the morning!) and it happily goes through these lines of code without error, but refuses to carry out the request it do as requested - it simply doesn't register any action.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: ListObject TotalsRowRange to sum - Autofill

    gotcha,

    change your destination range to begin w/ column 7:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-17-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    117

    Re: ListObject TotalsRowRange to sum - Autofill

    Well stone the crows! It works!
    So you have to included the original source range when using AutoFill - learn something new every day!

    Thanks!

  6. #6
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: ListObject TotalsRowRange to sum - Autofill

    glad i could help.

    also, i didn't know that either... so thanks to you too!

    don't forget to mark the post as solved!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Offset TotalsRowRange at start but not end
    By BuZZarD73 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2014, 07:50 AM
  2. [SOLVED] VBA - Problem with Autofill syntax with ListObject table
    By NDG1944 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-25-2014, 11:20 PM
  3. Use of ListObject
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-04-2013, 03:29 PM
  4. ListObject
    By costadina in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2009, 08:20 PM
  5. ListObject Name ?
    By rvExcelNewTip in forum Excel General
    Replies: 10
    Last Post: 01-22-2007, 11:29 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