1. Calculate total sales per order
| 1001 | North | Alice | 10 | 15 | 2024-01-05 |
| 1002 | South | Bob | 5 | 22.5 | 2024-01-06 |
| 1003 | East | Carol | 12 | 9.75 | 2024-01-07 |
| 1004 | West | Dave | 8 | 13.4 | 2024-01-08 |
| 1005 | North | Eve | 20 | 7.2 | 2024-01-09 |
=BYROW(A2:F6, LAMBDA(r, INDEX(r,4)*INDEX(r,5)))
Result: [150,112.5,117,107.2,144]
The lambda receives each row as r. INDEX(r,4) picks the Units column, INDEX(r,5) picks Unit Price. Multiplying gives the order total. BYROW stacks each total in a single column, producing the five numbers shown.
2. Flag high-value orders (> $500)
| 1001 | North | Alice | 10 | 15 | 2024-01-05 |
| 1002 | South | Bob | 5 | 22.5 | 2024-01-06 |
| 1003 | East | Carol | 12 | 9.75 | 2024-01-07 |
| 1004 | West | Dave | 8 | 13.4 | 2024-01-08 |
| 1005 | North | Eve | 20 | 7.2 | 2024-01-09 |
=BYROW(A2:F6, LAMBDA(r, INDEX(r,4)*INDEX(r,5) > 500))
Result: [FALSE,FALSE,FALSE,FALSE,FALSE]
Each row’s total sales are computed as before, then compared to 500. None of the five orders exceed that threshold, so the lambda returns FALSE for every row, and BYROW returns a column of FALSE values.
3. Create a "Region – Rep" label for each order
| 1001 | North | Alice | 10 | 15 | 2024-01-05 |
| 1002 | South | Bob | 5 | 22.5 | 2024-01-06 |
| 1003 | East | Carol | 12 | 9.75 | 2024-01-07 |
| 1004 | West | Dave | 8 | 13.4 | 2024-01-08 |
| 1005 | North | Eve | 20 | 7.2 | 2024-01-09 |
=BYROW(A2:F6, LAMBDA(r, INDEX(r,2)&" - "&INDEX(r,3)))
Result: ["North - Alice","South - Bob","East - Carol","West - Dave","North - Eve"]
The lambda extracts the Region (column 2) and Rep (column 3) from each row, concatenates them with a hyphen, and returns the string. BYROW assembles the five strings into a vertical array.