+ Reply to Thread
Results 1 to 3 of 3

Calculate average with variable

  1. #1
    Registered User
    Join Date
    01-13-2016
    Location
    München
    MS-Off Ver
    2013
    Posts
    19

    Calculate average with variable

    Good morning,

    I would like to calculate an average value in VBA by having the number of the last row as a variable. My version does not work... Can you help, please?
    Please Login or Register  to view this content.
    Thanks a lot in advance
    Greetings
    Moni

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Calculate average with variable

    Try this...

    Please Login or Register  to view this content.
    The average function will ignore text and blanks. You may also just use...
    =Average(L:L)
    Last edited by AlphaFrog; 01-31-2018 at 03:24 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    01-13-2016
    Location
    München
    MS-Off Ver
    2013
    Posts
    19

    Re: Calculate average with variable

    Ah, perfect, 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] Calculate average of variable number of cells variable number of times
    By WeirnetherlandsBart in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2014, 10:11 AM
  2. Replies: 4
    Last Post: 05-07-2014, 03:08 AM
  3. [SOLVED] Blank until at least 1 variable is entered, but stil calculate average
    By gocolonel77 in forum Excel General
    Replies: 3
    Last Post: 06-07-2013, 09:49 AM
  4. VBA: Calculate average based on data from previous column, variable length
    By zeno1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2012, 07:26 PM
  5. Calculate average over variable range
    By Lukini in forum Excel General
    Replies: 2
    Last Post: 02-25-2011, 03:38 AM
  6. Calculate average over variable range
    By haan0054 in forum Excel General
    Replies: 2
    Last Post: 12-18-2009, 05:43 AM
  7. Save average() of a variable selection to a variable
    By ebahr in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-10-2008, 07:15 PM

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