I have a problem with the last SWITCH in this formula. If this condition ISERR(Articles) is met, it returns one single celle with the string, which is the expected behavior. But if the COUNT(...) condition is met, it returns an array of strings "Check ...". The number of rows is equivalent to the variable Length. And the number of cols is equivalent to the number of cols in Result. Why this and how to avoid it ?!? Thanks in advance.
=LET(
Articles;FILTER(Preview!B7:B1006; (Preview!D7:D1006<>0));
TranscodedArticles; FILTER('Transco Table'!A1:C9999; ISNUMBER(MATCH('Transco Table'!A1:A9999; Articles; 0)));
ExplodedArticles; INDEX(TranscodedArticles;0;2);
Length;COUNTA(ExplodedArticles);
EmptyColumn;IF(SEQUENCE(Length);"");
EmptyColumns;IF(SEQUENCE(Length;12);"");
DateColumn;IF(SEQUENCE(Length);TODAY());
DEVANColumn;IF(SEQUENCE(Length);DEVANCell);
ProjectColumn;IF(SEQUENCE(Length);ProjectCell);
Quantities; BYROW(TranscodedArticles; LAMBDA(row; IFERROR(SUMIF(Preview!B7:B1006; INDEX(row;1); Preview!D7:D1006)*INDEX(row;3);"Notfound") ));
Result; HSTACK(DateColumn; DEVANColumn; ProjectColumn; EmptyColumns; ExplodedArticles; EmptyColumn; Quantities);
SWITCH(TRUE;
ISERR(Articles); "No lines with quantity found in Preview";
COUNT(FILTER(Articles; ISNA(MATCH(Articles; INDEX(TranscodedArticles;0;1); 0)))) <>0; "Check and complete 'Tranco Table' ('Number Stored' as Text or unkown codes) ... ";
Result
)
)


SUM(N(FILTER(Articles; ISNA(XMATCH(Articles; INDEX(TranscodedArticles;0;1)))) <>0))