I would use a similar approach for replacing both blanks and text.
Similar to @doubleunary's second approach, I would trigger an error, but I would use that same aporoach in both cases and simply change the result based on preferred error handing (blank vs. string).
Multi-Row Formula
The following formula in B2
will calculate the SUM for all rows in the range C2:M20
Return Empty Values
=BYROW(C2:M20, LAMBDA(row,
IFERROR(1/(1/SUM(row)))))
Return A String
=BYROW(C2:M20, LAMBDA(row,
IFERROR(1/(1/SUM(row)),"text")))
Return String but Skip Blank Rows
=BYROW(C2:M1000, LAMBDA(row,
IF(LEN(JOIN(,row)),
IFERROR(1/(1/SUM(row)),"Text"),)))
- If returning blanks instead of text, the additional approach has no benefit.