+ Reply to Thread
Results 1 to 6 of 6

Auto fill column in a table

  1. #1
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    237

    Question Auto fill column in a table

    When I recorded this macro, I was working with a list that only had 60 rows. The lists vary, so I need to modify the macro to autofill all necessary rows. What do I need to change? It's in the section for addign a grand total column.
    Please Login or Register  to view this content.
    Last edited by narrowgate88; 06-25-2010 at 02:48 PM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Auto fill column in a table

    I can't test this for obvious reasons

    However try this

    Please Login or Register  to view this content.

    I have tried to speed your code up a little.
    I hope I have not been over zealous.

    Hope this helps.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.

  3. #3
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    237

    Re: Auto fill column in a table

    I received a run-time error '1004': Autofill method of range class failed.

  4. #4
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    237

    Re: Auto fill column in a table

    I do like some of the streamlining that you did. I had thought about using Select Case instead of Ifs, but wasn't sure how it would affect processing speeds. I appreciate the removal of the range selections. I hadn't thought about doing that.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Auto fill column in a table

    We need a column that has previously been filled by your code (This will be of variable length) to base LastRow on

    In the meantime try changing this line
    Please Login or Register  to view this content.

    to
    Please Login or Register  to view this content.

    Let me know how it runs after that
    I have some suspicions on other lines.

    Cheers

  6. #6
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    237

    Re: Auto fill column in a table

    Worked perfectly.

+ 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