ROWOP(range_array, operation)
Applies the 2nd argument, operation, to the matrix row-wise resulting in a single row-vector.
Range_array can take the form of an explicit cell range (such as A1:C3) or the name of a named range.
Operation may be:
- ‘+’ or ‘sum’ (addition),
- '*' or ‘prod’ (product),
- ‘ave’ (average),
- ‘max’ (maximum)
- ‘min’ (minimum)
- 'and'
- 'or'
Examples
Example 1: Matrix 1 is shown below; each element is a constant.
See the ROWOP function in cell D2 = ROWOP(A2:B4, “+”)
D2 = A2 + A3 + A4 = 1 + 2 + 3 = 6
E2 = B2 + B3 + B4 = 4 + 5 + 6 = 15
Example 2:
Matrix 1 is shown below; each element is a constant.
See the ROWOP function in cell D2 = ROWOP(A2:B4, “ave”)
D2 = AVERAGE(A2 + A3 + A4) = (1 + 2 + 3)/3 = 2
E2 = AVERAGE(B2 + B3 + B4) = (4 + 5 + 6)/3 = 5
Example 3: Given a matrix containing binary values. The formula =ROWOP(range, “and”) returns 0 in cell B22 to indicate that there is at least one 0 in the corresponding column.