+ Reply to Thread
Results 1 to 2 of 2

How to autofill based on last row of data

  1. #1
    Registered User
    Join Date
    10-19-2010
    Location
    Arlington, WA
    MS-Off Ver
    Excel 2013
    Posts
    40

    How to autofill based on last row of data

    So I have a number of formulas that I have autofilling down to 15000 rows in this document as a "in case of" type measure. However, I only need to fill as far down as the last row where column D has any data in it. Here's an example:



    Range("I8").Select
    ActiveCell.FormulaR1C1 = _
    "=IF(RC[-6]=""Normal"",IF(AND(RC[-1]>2,RC[-1]<30),R[-1]C[-4],""""),"""")"
    Range("I8").Select
    Selection.AutoFill Destination:=Range("I8:I115000"), Type:=xlFillDefault

    I can't remember how to autofill based on last row of data. Using Excel 2013, and hoping to save my workbook some space/speed the macro up.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: How to autofill based on last row of data

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. VBA Macro to autofill data in column based on value on adjacent cell
    By cazantheman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-01-2013, 02:04 PM
  2. [SOLVED] Autofill based on data in other columns
    By db3712 in forum Excel General
    Replies: 8
    Last Post: 11-07-2012, 03:34 PM
  3. [SOLVED] Excel 2007 : Autofill based on column data
    By db3712 in forum Excel General
    Replies: 5
    Last Post: 06-28-2012, 10:06 AM
  4. Autofill macro based on above data
    By shoey72 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2008, 10:02 AM
  5. Formula to Autofill Info based on Other Data
    By SamanthaM in forum Excel General
    Replies: 1
    Last Post: 10-05-2005, 04:05 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