Results 1 to 5 of 5

worksheetfunction.average

Threaded View

  1. #1
    Registered User
    Join Date
    07-11-2017
    Location
    Belgium
    MS-Off Ver
    2007
    Posts
    2

    Smile worksheetfunction.average

    Hi,

    I have next issue with this code

    Sub test_array_average()
    
    Dim avgtime As Date
    Dim avg As Date
    
    t = Array("11:00:00", "11:00:06")
    avgtime = WorksheetFunction.Average(t(0), t(1))
    avg = WorksheetFunction.Average(t)
    
    End Sub
    It calculates avgtime correct but when it starts with the next line the program returns error 1004
    The only difference is that t is an array with the same time values as above.
    Somebody can help me to solve this probem?

    Thanks in advance
    Last edited by tifr; 07-11-2017 at 06:00 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] worksheetfunction.average
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2017, 07:55 PM
  2. [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
  3. [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
  4. 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
  5. VBA Worksheetfunction
    By TrueTears in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2013, 12:21 PM
  6. [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
  7. WorksheetFunction in VBA
    By MacroLide in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2009, 06:01 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