+ Reply to Thread
Results 1 to 3 of 3

worksheetfunction.average

  1. #1
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    worksheetfunction.average

    Why is this producing 0 when the result should be a decimal point answer (0.032748161) which is what I want?

    I have tried formatting and rounddown but neither work.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,627

    Re: worksheetfunction.average

    Because you have Dim'd APave as Long, i.e., as an integer value (whole number). Therefore use
    Dim APave As Single or
    Dim APave As Double (depending on how many decimal places you want)
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: worksheetfunction.average

    I'm just making stupid mistake after stupid mistake tonight, Cheers Proton you're a Legend

+ 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] Unable to get the average property of the worksheetfunction class
    By Lukael in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-01-2015, 01:41 AM
  2. [SOLVED] WorksheetFunction Average with variable ranges, help needed
    By MichaelMcF in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2014, 03:43 PM
  3. use of WorksheetFunction.max, min and average
    By obedus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2014, 07:51 AM
  4. [SOLVED] Using a filename in worksheetFunction.Average(Range("range").offset(0.0)
    By MikeSD in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-12-2012, 12:06 PM
  5. Cos & Sin WorksheetFunction
    By gsandy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-13-2009, 06:03 PM
  6. WorksheetFunction with VBA
    By Ghislain Marcotte in forum Excel General
    Replies: 2
    Last Post: 02-13-2005, 04:07 AM
  7. [SOLVED] Worksheetfunction help
    By Glen Mettler in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-09-2005, 08:06 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