+ Reply to Thread
Results 1 to 3 of 3

Assigning a macro to ALL cells in a column in table with undefined number of rows

  1. #1
    Registered User
    Join Date
    09-21-2014
    Location
    Citrus Heights, California
    MS-Off Ver
    2007
    Posts
    2

    Assigning a macro to ALL cells in a column in table with undefined number of rows

    Hi,

    I am new to this forum. I manage to use excel to maintain a database manually. New data is added everyday. Each day a new row is added. I know how to write a formula that calculates the average for a set of row data (for each row). I would like to write a macro for the value in the last column (The column for average) so that the avrage is calculated automatically as I add data for each day. Any suggestions, pointers, reference to sources would be greatly appreciated. Thank you.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Assigning a macro to ALL cells in a column in table with undefined number of rows

    Please post a workbook with some sample data and the results you want to see (based on that data). Otherwise, we'll just be guessing at what you're working with.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    09-21-2014
    Location
    Citrus Heights, California
    MS-Off Ver
    2007
    Posts
    2

    Re: Assigning a macro to ALL cells in a column in table with undefined number of rows

    OK. So here is a table example
    Date Val1 Val2 Val3 Val4 Val5 Average
    9/1/2014 56 72 100 45 68.25
    9/2/2014 75 86 88
    9/3/2014 92 120 78
    9/4/2014 110 84

    As you can see, there are null values in some cells. The Average function gives me the correct result as shown in row # 1.
    What I would like to accomplish is to have a macro for the Average Column so that the value is calculated automatically as new values
    are added incrementally to each column as the date column continues down. The values will be entered each day.

    Hope this clarifies my question. Thank you.

+ 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] Deleting a range with defined column widths but undefined numbers of rows.
    By moosetales in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-18-2014, 05:30 PM
  2. Macro to select 1 column and a variable number of table rows.
    By Foxquilter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2014, 10:38 AM
  3. Deleting rows in undefined column length
    By beerbud89 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-01-2013, 12:06 PM
  4. [SOLVED] Macro to update the date column for certain rows in a table depending on a column value
    By ajolin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-18-2012, 12:21 AM
  5. Coppy an undefined number of cells from one sheet to another
    By goatcheesesalad in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2008, 06:29 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