Single value expected, but array delivered

Boris Georgi 0 Reputation points
2025-01-17T11:47:25.6966667+00:00

Hi @ all!

This formula should spill all data from January 2025 and expand this array by 3 (3 = WEEKDAY from January 1st, 2025). But it only works if the @ is added:

=LET(x,DATE(2025,1,SEQUENCE(31)),WT,WEEKDAY(INDEX(x,1),2),EXPAND(x,ROWS(x)+**@**WT,1,0))

Obviously the variable WT does not contain a single value (as expected from me) but an array. Furthermore, not a one-dimensional but a two-dimensional array, because this formula (without @) also works:

=LET(x,DATE(2025,1,SEQUENCE(31)),WT,WEEKDAY(INDEX(x,1**,1**),2),EXPAND(x,ROWS(x)+WT,1,0))

If I reduce the formula like this as a test for WT and evaluate it with F9

=LET(x,DATE(2025,1,SEQUENCE(31)),WT,WEEKDAY(INDEX(x,1),2),WT)

an array appears:  ={3}

With INDEX(x,1,1) instead of INDEX(x,1) the result is =3 and not ={3}

Is this a desired behavior?

MG, Boris

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
2,088 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.