+ Reply to Thread
Results 1 to 2 of 2

VBA: Find the average of a column with a dynamic range

  1. #1
    Registered User
    Join Date
    01-27-2014
    Location
    Fresno, USA
    MS-Off Ver
    Excel 2007
    Posts
    47

    VBA: Find the average of a column with a dynamic range

    Greetings,

    I have data in the range P14:P28. I wrote a macro that appends a new data point at P14 every time the macro is used, which increases the range of the column to P14:P29, and also calculates the average of the new range (P14:P29) in cell P31. The problem is that I need the formula to be dynamic, so that when another data point is appended to the table, the average of the newest range (P14:P30) is calculated in cell P32. When the macro is used again, another data point is added, the average is calculated over the range P14:P31 in cell P33, and so on and so forth.

    Thanks for the help in advance,

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,606

    Re: VBA: Find the average of a column with a dynamic range

    find where data ends after adding a new one.
    for instance
    Please Login or Register  to view this content.
    now you can write:
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

+ 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] Find Average, Return Column Header of Number Closest To Average
    By djmyers in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-07-2013, 04:19 PM
  2. Dynamic Range average
    By rjhe22 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-12-2013, 03:42 PM
  3. [SOLVED] Find specific cell and return column number from a dynamic range
    By nivoe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-18-2012, 12:39 PM
  4. Dynamic range in average formula
    By Cicada in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-09-2011, 02:08 PM
  5. Replies: 14
    Last Post: 04-02-2010, 02:22 AM

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