I have 2 dynamic 2d arrays of equal length n x y. I want to add every entry of row n of the 1st array to every entry of row n of the 2nd array for every row. It will make a n x n spilled 2d array for each row. Based on some criteria I want to filter out 1 value out of it at a later stage. I have made a formula that can do that but has no spill behavior. I want it to be dynamic and expand to n rows automatically without dragging it.
I know the reason it is not dynamic is because of the row_num entry of the index formula. I tried to use sequence formula but it messed up the addition. Any non-VBA solution to this?
Edit:
I want this output in U47
The formula used in U47 is
=TRANSPOSE(INDEX($M$47#,ROW(M47)-ROW($M$47)+1,) + TRANSPOSE(INDEX($Q$47#,ROW(M47)-ROW($M$47)+1,)))
In my case, I can't have this because I will have a spill error. I know I can't have a 4 x 4 output in one cell because it will spill if I have a value in a cell below it.
However, I will only use one value out of the 16 values depending on certain criteria. One thing I can do is to apply the criteria in the cell like this
The problem is that the array doesn't remain dynamic. I have to drag it every time the number of rows of array M47# and Q47# changes. I want it to be dynamic. What can I do to encounter this problem?
=TRANSPOSE(INDEX($M$47#,ROW(M47)-ROW($M$47)+1,) + TRANSPOSE(INDEX($Q$47#,ROW(M47)-ROW($M$47)+1,)))
formula in the cell