+ Reply to Thread
Results 1 to 5 of 5

VBA to copy a formula down a range based on the size of the pivot table parallel to it

  1. #1
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    VBA to copy a formula down a range based on the size of the pivot table parallel to it

    Morning all,

    What VBA code do I require to copy the formulas in cells D4 and E4 down to match the same row as the last date in the pivot table running adjacent to it, i.e. down to row 116? The pivot table will regularly change size so ideally I need something to recognise the size of the pivot table and copy down accordingly.

    Example attached.

    Thanks in advance,

    Snook
    Attached Files Attached Files
    Last edited by The_Snook; 07-24-2013 at 05:49 AM. Reason: Amended example

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA to copy a formula down a range based on the size of the pivot table parallel to it

    Hi The_Snook,
    try something like
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: VBA to copy a formula down a range based on the size of the pivot table parallel to it

    Works a treat mate, cheers!

    If you don't mind could you write a brief explanation of how it works to increase my understanding?

    Thanks

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA to copy a formula down a range based on the size of the pivot table parallel to it

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: VBA to copy a formula down a range based on the size of the pivot table parallel to it

    Superb, that's been a big help, thanks!

+ 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] Dynamically Changing Position of Pivot Based on Size of Another Pivot Table
    By ggilzow in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2013, 02:42 PM
  2. Replies: 5
    Last Post: 01-06-2012, 04:35 PM
  3. Create a table with size based on a formula (VBA)
    By Coaster in forum Excel General
    Replies: 6
    Last Post: 05-08-2010, 11:45 AM
  4. Automatically selecting print area based on Pivot Table size
    By mike703 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2008, 11:17 AM
  5. Auto size a pivot table to a page size
    By *.* in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-23-2006, 12:09 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