+ Reply to Thread
Results 1 to 3 of 3

VBA to autofill formula row down to other rows where adjacent column is populated

  1. #1
    Registered User
    Join Date
    05-29-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    2

    VBA to autofill formula row down to other rows where adjacent column is populated

    Hi All

    This is my first post.....

    I've created a row of formulae from cell E6 to NI6 and was hoping that this row of formulae would be copied down to all rows where column D <> "". I'm trying to keep the workbook to as small in size as possible - the data will never go further than row 500.

    When information is added to additional rows in column D could the formula please then run until the new last row of data in column D

    I'm very experienced with excel but a near novice with VBA (I'm ok with amending already written VBA but struggle to write from scratch)

    I've attached the file, please ignore my feeble attempt at vba

    Any help would be much appreciated

    Thanks in advance.

    James
    Attached Files Attached Files
    Last edited by jamesr86; 07-14-2016 at 01:55 AM. Reason: additional info

  2. #2
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    N/A
    MS-Off Ver
    N/A
    Posts
    373

    Re: VBA to autofill formula row down to other rows where adjacent column is populated

    We have to use column G here, because it is the only column where the rest of the cells are blank after your data stops. so we can use WS.Cells(Rows.Count, 7).End(xlUp).Row, 7 corresponds to the column number.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-29-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    2

    Re: VBA to autofill formula row down to other rows where adjacent column is populated

    Hi

    Thanks, it seems to fill the formula down to the end of the spreadsheet rather than just to where the data stops in column d, I'd like it is possible to check the cells in column D (up to cell 500)and if populated copy the formulae to that row from E6 TO NI6.

    There is data validation on column d (dropdown lists) not sure if this is causing the issue?

    Thanks

    James

+ 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. Replies: 3
    Last Post: 07-22-2014, 09:08 AM
  2. Replies: 1
    Last Post: 07-01-2013, 12:14 PM
  3. [SOLVED] Autofill Upwards With Reference to Adjacent Column
    By picton2000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2013, 04:12 PM
  4. [SOLVED] Macro to autofill formula down to length of adjacent column to the left
    By jacobadger in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2012, 08:28 PM
  5. [SOLVED] Macro to calc. #'s btwn variable rows/columns corresponding to an adjacent populated cell
    By kbspence in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2012, 12:28 PM
  6. [SOLVED] VBA Code Required to autofill formulated column according to the adjacent column
    By bonny24tycoon in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-30-2012, 12:05 PM
  7. Autofill a column based on number in adjacent column
    By fbonetti in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-08-2011, 04:19 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