Xlambda
Well-known Member
- Joined
- Mar 8, 2021
- Messages
- 837
- Office Version
- 365
- Platform
- Windows
AFLAT "flattens" any array and filters out blanks, null strings, errors
Other function on minisheet AFLATTEN
Other function on minisheet AFLATTEN
Excel Formula:
=LAMBDA(a,
LET(r,ROWS(a),c,COLUMNS(a),s,SEQUENCE(r*c),
q,QUOTIENT(s-1,c)+1,m,MOD(s-1,c)+1,
x,INDEX(IFERROR(IF(a="","",a),""),q,m),FILTER(x,x<>"")
)
)
LAMBDA 10.0.xlsx | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | AFLAT function, same functionality as AFLATTEN, only that filters out null strings blanks and errors | |||||||||||
2 | sample | ↓ ="" | =AFLATTEN(A3:C5) | =AFLAT(A3:C5) | ||||||||
3 | 2 | #DIV/0! | 2 | 2 | ||||||||
4 | x | #N/A | x | |||||||||
5 | 3 | y | #DIV/0! | 3 | ||||||||
6 | x | y | ||||||||||
7 | null string | #N/A | ||||||||||
8 | blank | |||||||||||
9 | 3 | |||||||||||
10 | ||||||||||||
11 | y | |||||||||||
12 | ||||||||||||
AFLAT post |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E2,G2 | E2 | =FORMULATEXT(E3) |
C3 | C3 | =1/0 |
E3:E11 | E3 | =AFLATTEN(A3:C5) |
G3:G6 | G3 | =AFLAT(A3:C5) |
B2 | B2 | ="↓ "&FORMULATEXT(B3) |
B3 | B3 | ="" |
B4 | B4 | =NA() |
Dynamic array formulas. |
Upvote
0