Signature (Visual Basic / VBA)
Public Function SumOfSquares( _
ParamArray vValues() As Variant _
) As Variant
Code Example
SumOfSquares(12, 34, 56) = 4436
SumOfSquares(SampleData) = 1989646
Parameters
| Parameter | Description |
|---|---|
| vValues | The values whose squares are to be added together. Can be numbers, one-dimensional numeric arrays, one-dimensional Variant arrays, one-dimensional Variant arrays with embedded arrays, or any combination of these. The current setting of the StatVarType Property determines which numeric data types are recognized by this function. |
Return Value
Function returns the sum of the squares of the numeric values. Function returns Null if none of the arguments are numeric.