LEFTARRAY returns the LEFT N columns (or rows or both) of an array.
Excel Formula:
=LAMBDA(array,n,direction,INDEX(array,SEQUENCE(IF(direction=0,ROWS(array),n)),SEQUENCE(,IF(direction=1,COLUMNS(array),n))))
| Lambda - Last Cell and Split.xlsx | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| B | C | D | E | F | G | H | I | J | K | L | M | N | O | |||
| 1 | Original Array | Left 2 Columns | Left 2 Rows | Left 2 columns and rows | ||||||||||||
| 2 | this | is | my | this | is | this | is | my | this | is | ||||||
| 3 | array | of | words | array | of | array | of | words | array | of | ||||||
| 4 | or | numbers | like | or | numbers | |||||||||||
| 5 | 1 | 2 | 3 | 1 | 2 | |||||||||||
| 6 | ||||||||||||||||
Sheet1 | ||||||||||||||||
| Cell Formulas | ||
|---|---|---|
| Range | Formula | |
| F2:G5 | F2 | =LEFTARRAY($B$2:$D$5,2,) |
| I2:K3 | I2 | =LEFTARRAY($B$2:$D$5,2,1) |
| M2:N3 | M2 | =LEFTARRAY($B$2:$D$5,2,2) |
| Dynamic array formulas. | ||
Upvote
0