Array Transformation functions
AHCLEAN
Reference
» Reference, Discussion, & Example Applications:
About
Array Horizontal Clean, replaces errors with null strings and filters all the rows depending on nr. of blnks/null strings on each row.
Inputs:
- ar : array
- [n] : = 0 or omitted, filters only “full” rows sum(blnks) = 0
- [n] : > 0 filters the rows that have sum(blnks) <= n
- [n] : < 0 filters only rows that have sum(blnks) >= abs(n)
Code
M.S. Excel
AHCLEAN = LAMBDA(ar, [n],
LET(
a, IF(ISERROR(ar), "", IF(ar = "", "", ar)),
x, BYROW(a, LAMBDA(a, SUM(--(a = "")))),
m, MIN(ABS(n), MAX(x)),
FILTER(a, IF(n >= 0, x <= m, x >= m))
)
);
Feedback
Submit and view feedback