+ Reply to Thread
Results 1 to 13 of 13

VBA to AutoFill down dynamic columns

Hybrid View

  1. #1
    Registered User
    Join Date
    06-17-2013
    Location
    Wilkes-Barre, PA
    MS-Off Ver
    Excel 2010
    Posts
    16

    VBA to AutoFill down dynamic columns

    I'm looking for a VBA to AutoFill down the contents in column B. It's difficult to describe what I am looking to do, but essentially I want to AutoFill the contents of cell Bn to the next row with text and continue to the end of the sheet. Is this possible in one Macro? Attached is a sample of the raw data. Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: VBA to AutoFill down dynamic columns

    If I understand what you mean.... Filter column B for blanks. Then in the first blank cell, should be B3, enter =B2 and drag to the last row.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA to AutoFill down dynamic columns

    No need for macro!
    There is an excel built-in function:
    Highlight column B
    CRTL plus G
    click special
    tick blank
    go to B3= and copy B2 then
    No enter, but CRTL plus enter fill in down.
    Attached Files Attached Files
    Last edited by AB33; 09-11-2013 at 11:49 AM.

  4. #4
    Registered User
    Join Date
    06-17-2013
    Location
    Wilkes-Barre, PA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: VBA to AutoFill down dynamic columns

    This doesn't work in full. Not all the data in Column B should be the same. In the attached sample, B2:B24 are the same, B25:B38 are the same, B39:B70 are the same, etc.

  5. #5
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: VBA to AutoFill down dynamic columns

    So maybe elaborate more on what you want to achieve, possibly post a new sample workbook with at least 50-100 rows of the desired results in.

  6. #6
    Registered User
    Join Date
    06-17-2013
    Location
    Wilkes-Barre, PA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: VBA to AutoFill down dynamic columns

    Good idea. Here is a sample of what the intention would be. Hopefully this helps. Thanks again.
    Attached Files Attached Files

  7. #7
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: VBA to AutoFill down dynamic columns

    That is exactly what AB33's and my solution is doing - just different approach. Did you follow the steps correctly?

    Also, remember to highlight entire column B, copy, and paste special as values.

  8. #8
    Registered User
    Join Date
    06-17-2013
    Location
    Wilkes-Barre, PA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: VBA to AutoFill down dynamic columns

    Maybe not. What do I do after clicking OK on the Go To Special window?

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA to AutoFill down dynamic columns

    CRTL plus G will take you to a mini-window called Go to, there you click special

  10. #10
    Registered User
    Join Date
    06-17-2013
    Location
    Wilkes-Barre, PA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: VBA to AutoFill down dynamic columns

    I understand the following steps:
    Highlight column B
    CRTL plus G
    click special
    tick blank
    click OK

    I'm not sure what to do next. Thank you.

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA to AutoFill down dynamic columns


  12. #12
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA to AutoFill down dynamic columns

    It is easier to follow this link

    http://www.youtube.com/watch?v=CpYnLnhTgOo

  13. #13
    Registered User
    Join Date
    06-17-2013
    Location
    Wilkes-Barre, PA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: VBA to AutoFill down dynamic columns

    Got it. Thank you.
    Highlight column B
    CRTL plus G
    click special
    tick blank
    click OK
    type "=B2"
    press CTL+Enter

+ 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. Need help with dynamic autofill
    By oldmanexcel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2013, 11:36 AM
  2. [SOLVED] Dynamic autofill VBA
    By Siglen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-31-2012, 01:10 AM
  3. Autofill dynamic 1 cell to the right
    By max3732 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-05-2011, 04:47 PM
  4. Autofill dynamic columns and rows
    By JimmyA in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2009, 03:33 PM
  5. [SOLVED] Autofill dynamic no. of rows and columns
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2005, 09:05 PM

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