Spill formula not behaving as expected

Eewec 0 Reputation points
2026-01-05T20:55:00.0333333+00:00

Got a bit of a big formula and it's not behaving at all as I'd expect, or as it does when taken in smaller chunks as a test for the final version. Not sure if it's a bug I'm running in to or my formula not being written correctly.

The last thing I do is use a bycol() to merge multiple rows into 1, but it's giving me the answer over the same number of rows as the input to the bycol() which I thought wasn't what it should be doing.

This is the result I'm getting;

User's image I am baffled why bycol() is giving 4 rows as an answer.

I've tried to post the contents of cell A2 but it keeps rejecting the edit as me not being authenticated or when I tried to include it in the original post it flat out refused to let me post at all... not at all sure what's going on there... will it let me post it as a picture?

User's image Removing that last line of hstack() and using tmp in the last bycol() gives me this (column headings edited accordingly);

User's image

and as you can see the last column is now formatting correctly and not as #N/A.

If I change that last bycol() to simply output tmp, then this is the result;

User's image

As you can clearly see, tmp is 4 rows. I'm trying to get the multiple rows from this to output into one row so I can use 1 row per "customer" as a summary line, but obviously that's not working the way I'd expect it to.

Also having column A be the date for the "End of the week it's calculated for" would also be great without losing the last column as that's going to be for if a customer changes their order and I can see when to go from old order to new order.

Microsoft 365 and Office | Excel | For home | Windows
{count} votes

Your answer

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