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
Bookmarks