Skip to main content

PRODUCT

Multiplies all the numbers given as arguments.

Syntax

expression.PRODUCT(args);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
argsRequirednumber | ApiRange | number[]Up to 255 numeric values that will be multiplied. The first argument is required, subsequent arguments are optional. Arguments can be numbers, ranges, or arrays of numbers.

Returns

number

Example

This example shows how to multiply all the numbers given as arguments.

// How to return the result after multiplication.

// Use a function to multiply a list of numbers.

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.PRODUCT(65, 34, 165, 6, 9, 54));