+ Reply to Thread
Results 1 to 3 of 3

VBA code to copy formula down table

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-06-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    352

    VBA code to copy formula down table

    Good Morning,

    I have a microsoft query data table that updates itself every minute. The table has formulas in. When the table updates itself and adds new rows in the table for new data, the formulas do not copy down to these news rows automatically.

    How can I do this please?

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: VBA code to copy formula down table

    Do you already have a code to add to or are you starting from scratch?

    Can you post a sample workbook so we can see where the formulas are?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Contributor
    Join Date
    03-06-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    352

    Re: VBA code to copy formula down table

    I got the following code from another poster, but it didn't seem to work properly, just made Excel crash:

    Private Sub Worksheet_Change(ByVal Target As Range)
    LR = Cells(Rows.Count, 1).End(xlUp).Row
    PR = Cells(Rows.Count, 7).End(xlUp).Row
    Range("G" & PR & ":I" & PR).Copy Range("G" & LR & ":I" & LR)
    End Sub

+ 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 code to copy first 50000 records from Access table to excelsheet
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-21-2014, 10:20 AM
  2. [SOLVED] Copy and paste formula outside pivot table using information from table
    By batjl9 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-01-2014, 07:10 AM
  3. Advice and help with a copy past code or filldown formula code
    By KELLIS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2013, 02:07 PM
  4. VBA Code to copy table from word into excel
    By sharonb888 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-03-2013, 02:15 AM
  5. Copy Table Code - Tweak
    By SamuelT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-13-2010, 10:58 AM

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