1. Length of each header
| EmpID | Name | Dept | HireDate | Salary | Status |
| 101 | Alice | Sales | 2020-03-15 | 75000 | Active |
| 102 | Bob | Engineering | 2019-07-01 | 90000 | Active |
| 103 | Carol | HR | 2021-01-20 | 65000 | On Leave |
| 104 | David | Sales | 2018-11-30 | 80000 | Active |
| 105 | Eve | Engineering | 2022-05-10 | 72000 | Inactive |
=BYCOL({{"EmpID","Name","Dept","HireDate","Salary","Status"};{101,"Alice","Sales","2020-03-15",75000,"Active"};{102,"Bob","Engineering","2019-07-01",90000,"Active"};{103,"Carol","HR","2021-01-20",65000,"On Leave"};{104,"David","Sales","2018-11-30",80000,"Active"};{105,"Eve","Engineering","2022-05-10",72000,"Inactive"}}, LAMBDA(col, LEN(INDEX(col,1))))
Result: 544866
The lambda receives each column, extracts the first cell (the header) with INDEX(col,1), and measures its length with LEN. BYCOL runs this on all six columns, producing a row of header lengths: EmpID (5), Name (4), Dept (4), HireDate (8), Salary (6) and Status (6).
2. Average numeric columns, N/A for text columns
| EmpID | Name | Dept | HireDate | Salary | Status |
| 101 | Alice | Sales | 2020-03-15 | 75000 | Active |
| 102 | Bob | Engineering | 2019-07-01 | 90000 | Active |
| 103 | Carol | HR | 2021-01-20 | 65000 | On Leave |
| 104 | David | Sales | 2018-11-30 | 80000 | Active |
| 105 | Eve | Engineering | 2022-05-10 | 72000 | Inactive |
=BYCOL({{"EmpID","Name","Dept","HireDate","Salary","Status"};{101,"Alice","Sales","2020-03-15",75000,"Active"};{102,"Bob","Engineering","2019-07-01",90000,"Active"};{103,"Carol","HR","2021-01-20",65000,"On Leave"};{104,"David","Sales","2018-11-30",80000,"Active"};{105,"Eve","Engineering","2022-05-10",72000,"Inactive"}}, LAMBDA(col, IF(ISNUMBER(INDEX(col,2)), AVERAGE(col), "N/A")))
Result: 103N/AN/AN/A76400N/A
The lambda checks the second row of each column; if it is numeric, the whole column is averaged. EmpID and Salary contain numbers, so their averages are 103 and 76,400 respectively. All other columns start with text, so the lambda returns "N/A" for them. BYCOL assembles these six results into a single row.
3. Count of Active status per column
| EmpID | Name | Dept | HireDate | Salary | Status |
| 101 | Alice | Sales | 2020-03-15 | 75000 | Active |
| 102 | Bob | Engineering | 2019-07-01 | 90000 | Active |
| 103 | Carol | HR | 2021-01-20 | 65000 | On Leave |
| 104 | David | Sales | 2018-11-30 | 80000 | Active |
| 105 | Eve | Engineering | 2022-05-10 | 72000 | Inactive |
=BYCOL({{"EmpID","Name","Dept","HireDate","Salary","Status"};{101,"Alice","Sales","2020-03-15",75000,"Active"};{102,"Bob","Engineering","2019-07-01",90000,"Active"};{103,"Carol","HR","2021-01-20",65000,"On Leave"};{104,"David","Sales","2018-11-30",80000,"Active"};{105,"Eve","Engineering","2022-05-10",72000,"Inactive"}}, LAMBDA(col, COUNTIF(col, "Active")))
Result: 000003
COUNTIF scans each column for the exact text "Active". Only the Status column contains that value three times (Alice, Bob, David); all other columns have none, so BYCOL returns a row of zeros except for the final column, which shows 3.