Microsoft Office Tutorials and References
In Depth Information
MySum = args(i)
Exit Function
Case “Boolean”
‘ Check for literal TRUE and compensate
If args(i) = “True” Then MySum = MySum + 1
Case “Date”
MySum = MySum + args(i)
Case Else
MySum = MySum + args(i)
End Select
End If
Next i
End Function
The workbook sum function emulation.xlsm containing the MYSUM function is avail-
able at this topic's website.
Figure 26-10 shows a workbook with various formulas that use SUM (column E) and MYSUM (column G). As
you can see, the functions return identical results.
Search JabSto ::




Custom Search