+ Reply to Thread
Results 1 to 6 of 6

Macro to repeat autofil in several columns

  1. #1
    Registered User
    Join Date
    08-13-2004
    Posts
    66

    Macro to repeat autofil in several columns

    I have recorded and example macro for a spreadsheet. How would I edit this macro so that it will autofil/copy/paste text one column at a time (eg. first for column B then C then D then all the way to column CF). I need to do it one at a time as each column will have 50,000 rows of data.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Macro to repeat autofil in several columns

    Is the code applying a formula in row 2 as well?

    There is usually a better approach than using autofill.

    Dom
    Last edited by Domski; 03-18-2010 at 08:33 AM. Reason: Silly question
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    08-13-2004
    Posts
    66

    Re: Macro to repeat autofil in several columns

    Quote Originally Posted by Domski View Post
    Is the code applying a formula in row 2 as well?

    There is usually a better approach than using autofill.

    Dom
    I want the formula in B2 to be copied down to B50000, then copy the formula C2 down to C50000 etc... to CF

  4. #4
    Registered User
    Join Date
    08-13-2004
    Posts
    66

    Re: Macro to repeat autofil in several columns

    The copy/paste portion that relates to B3:B50000 is there to keep the formula in B2.

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Macro to repeat autofil in several columns

    Try:

    Please Login or Register  to view this content.

    Dom

  6. #6
    Registered User
    Join Date
    08-13-2004
    Posts
    66

    Re: Macro to repeat autofil in several columns

    Thanks a million, that works 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