# BYCOL

Formulas / BYCOL
Process data in an array or range in a "by column" fashion.
`=BYCOL(array, [lambda])`
• array - the data to process
• lambda - [OPTIONAL] the value to process

## Examples

• `=BYCOL(range,LAMBDA(column,SUM(column)))`

The BYCOL function can be used to quickly calculate the sum of all columns in a range. This is done by using the above formula, and will return the sum of each column in the range using the SUM function.

• `=BYCOL(range,LAMBDA(column,AVERAGE(column)))`

The BYCOL function can also be used to calculate the average of each column in a range. This can be done by using the above formula and will return the average of each column in the range using the AVERAGE function.

• `=BYCOL(range,LAMBDA(column,MAX(column)))`

The BYCOL function can also be used to calculate the maximum value of each column in a range. This can be done by using the formula above and will return the maximum value of each column in the range using the MAX function.

• `=BYCOL(range,LAMBDA(column,MIN(column)))`

This formula can also be used to calculate the minimum value of each column in a range, and will return the minimum value of each column in the range using the MIN function.

## Summary

BYCOL is a function that takes two arguments and applies a LAMBA function to each column of an array in a "by column" fashion, returning one result per column.

• The BYCOL function returns a single result per column and processes a range of columns, returning an array of results.
• The BYCOL function must be used with a LAMBDA function.

What is the BYCOL function?
The BYCOL function is a function used to return an array with the result of calculating each column of a given array. It takes two arguments, an array and a lambda.
Do I have to provide any arguments for the BYCOL function?
Yes, both the array and the lambda arguments must be supplied. If either argument is invalid or missing, an error will be returned.
What is a lambda?
A lambda is a piece of code that is used to perform some sort of calculation or operation on an array. For example, you might use a lambda to calculate the sum of all elements in an array.
What happens if I provide invalid arguments for the BYCOL function?
If you provide any invalid arguments for the BYCOL function, an error will be returned. This could be due to the arguments being invalid, not being provided at all, or not having enough arguments.

## Make Better Decisions With Data

Analyze data, automate reports and create live dashboards
for all your business applications, without code. Get unlimited access free for 14 days.

Drop CSV