+ Reply to Thread
Results 1 to 2 of 2

Loop Autofill (based on activecell, not cell reference, varying row counts)

  1. #1
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Loop Autofill (based on activecell, not cell reference, varying row counts)

    Hi,

    I'm trying to write a quick code that will loop the auto fill function.

    I have a sheet w/ two columns, in column A there is data every few rows (rows in between are blank); number of rows in between vary. In column b, there is data in each cell

    Is it possible to have a code that allows me to auto fill all the blanks w/ the content in the first row before the blanks? (w/o VBA i would double click to autofill, click next cell in a w/ data, and repeat)

    All autofill VBA codes I've seen relate to specific cells - for this exercise, the cells being filled will differ as we move down the column

    The below code allows me to offset a range by 1, this would be the last line in my loop:
    Cells(Selection.Row + Selection.Rows.Count, Selection.Column).Select

    Thank you!

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Loop Autofill (based on activecell, not cell reference, varying row counts)

    Maybe

    Please Login or Register  to view this content.
    If you are happy with my response please click the * in the lower left of my post.

+ 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] Countif code that counts cells based on text string specified in a reference cell
    By john quinn in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 01-08-2015, 06:30 PM
  2. [SOLVED] Varying validation drop-downs based on varying cell values
    By navarreman1 in forum Excel General
    Replies: 2
    Last Post: 08-08-2013, 08:13 AM
  3. [SOLVED] AutoFill Macro from ActiveCell Fail
    By OobiEd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2013, 12:11 AM
  4. [SOLVED] For step loop, need step size to change based on reference cell in row
    By Telperion in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-22-2013, 03:41 PM
  5. [SOLVED] Autofill text starting at the ActiveCell
    By canadian_chickie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-10-2012, 03:55 PM
  6. Varying a cell reference in a formula
    By bgbeamer in forum Excel General
    Replies: 4
    Last Post: 01-07-2009, 11:40 AM
  7. Autofill based on a cell reference
    By redstang423 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-11-2006, 05:55 PM

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