Results 1 to 3 of 3

WorksheetFunction.Sum

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-08-2014
    Location
    Toronto, Canada
    MS-Off Ver
    2007
    Posts
    122

    WorksheetFunction.Sum

    Hi everyone,
    I am sure that I must be doing something wrong however I am not sure what it is.

    Can you please review the attached macro and explain why I am getting the below answer when the correct answer should be 0.
    WorksheetFunction.Sum.error.JPG
    Please select range A1 to B11 and then run the macro.

    WorksheetFunction.Sum.JPG

    Sub Test()
    Dim v As Double
    Selection.SpecialCells(xlCellTypeVisible).Select
    v = Application.WorksheetFunction.Sum(Selection)
    MsgBox v
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. WorksheetFunction.Min()
    By Peter Taylor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2016, 06:52 PM
  2. Worksheetfunction
    By pra.icwa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2013, 11:53 AM
  3. VBA Worksheetfunction
    By TrueTears in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2013, 12:21 PM
  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. WorksheetFunction gives zero value
    By helmekki in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-08-2007, 08:48 PM
  7. Can't use WorksheetFunction
    By Yossi in forum Excel General
    Replies: 5
    Last Post: 01-25-2006, 06:10 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