I'm often encountering very frustrating #CALC! errors when using LAMBDA inside a MAP, BYROW, BYCOL, or MAKEARRAY function. This is very similar to the following question but I found that example and solution too long to adapt it to my own situation: Excel: #CALC! error (Nested Array) when using MAP functions for counting interval overlaps
Below is a contrived but minimal example that illustrates my problem:
=LET(
nums, SEQUENCE(25),
rs, {10; 20},
cs, {1, 2, 3},
MAKEARRAY(
ROWS(rs),
COLUMNS(cs),
LAMBDA(i, j,
LET(
r, INDEX(rs, i),
c, INDEX(cs, j),
SUMIFS(nums, nums, r + c)
)
)
)
)