BYCOL Formula in Excel
The BYCOL formula in Excel applies a LAMBDA formula to each column and provides an array of the results. The BYCOL formula in Excel is a part of logical formulas.
The BYCOL formula is available in Excel 365. If the BYCOL formula is not available or not working, then update the Excel to the latest version.
Subscribe Rath Point's official YouTube channel to know the latest updates, tips, and tricks.
How to use the BYCOL Formula in Excel?
The article in this webpage describes how to use the BYCOL formula in Excel with syntax, detailed explanation and examples.
Syntax
=BYCOL(array, lambda(column))
The arguments for BYCOL formula are:
- Array (required argument) – This is the array or range of data.
- LAMBDA (required argument) – This is the LAMBADA formula that takes a single parameter which should be a column and calculates one result.
- Column (required argument) – This is a column from an array or range.
Examples
Example 1 (sum of each column)
If you use a LAMBDA formula to sum a column, then you can use BYCOL formula to apply that formula to each column. In this example of BYCOL formula, the single formula in cell F6 calculates the total for both Buy and Sells columns by using the SUM formula.
=BYCOL(C6:D9,LAMBDA(array,SUM(array)))
BYCOL formula Example (sum of each column)
Example 2 (minimum value of each column)
Instead of “array”, you can use “column” also in the BYCOL formula. Like the above example, BYCOL formula can be used with different formulas to calculate for each column. In this BYCOL formula example, to get the minimum value of each column include MIN formula.
=BYCOL(C6:D9,LAMBDA(column,MIN(column)))
BYCOL formula Example (minimum value of each column)
Important Notes
You must remeber the below key points while using the Excel BYCOL formula:
- #VALUE! error if there is incorrect parameters or invalid LAMBDA formula.
- #CALC error if a single value returned, without LAMBDA formula or other reason.
» Excel Formulas (Category)