+ Reply to Thread
Results 1 to 2 of 2

Using WorksheetFunction.Mode

  1. #1
    Registered User
    Join Date
    09-21-2015
    Location
    Andromeda
    MS-Off Ver
    2013
    Posts
    1

    Using WorksheetFunction.Mode

    I am having trouble using the Mode function (to determine the most repeated value in a group)
    the line that fails on execution is the following:

    [b96].Offset(statistic, Var + (country - 1) * 8) = WorksheetFunction.Mode(rango)

    where

    rango = Workbooks("na_data.xlsx").Worksheets(3).[a1].Offset(fil_1 + dif + 10 * i, col).Resize(10, 1)

    rango is a vector containing numbers in each of its 10 cells

    The error states "Unable to get Mode property of WorksheetFunction class”

    Can anybody find where is the flaw in this code?

    Thanks in advance

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

    Re: Using WorksheetFunction.Mode

    (How to) Attach a Workbook
    (please do not post pictures or links to worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Ben Van Johnson

+ 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. VBA Code Runs in Debug Mode But Returns Type Mismatch Error Outside Debug Mode
    By valerie.k.chiang in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2014, 03:48 PM
  2. [SOLVED] Code skips on Run Mode but runs fine on F8 (Debug Mode)
    By RaquelAR in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-25-2013, 01:05 PM
  3. Replies: 4
    Last Post: 06-06-2013, 10:21 AM
  4. Cos & Sin WorksheetFunction
    By gsandy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-13-2009, 06:03 PM
  5. worksheetfunction through vba
    By helpMe9999 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2008, 07:15 AM
  6. Can I use VBA to check if the sheet(xxx) is in Page-Break mode or Normal mode ?
    By BaLLZaCH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2008, 09:03 AM
  7. [SOLVED] Worksheetfunction help
    By Glen Mettler in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-09-2005, 08:06 PM
  8. Replies: 0
    Last Post: 01-07-2005, 04:06 PM

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