saboh12617
Board Regular
- Joined
- May 31, 2024
- Messages
- 71
- Office Version
- 365
- Platform
- Windows
Hello,
My problem is the following:
I have values in dynamic arrays, let's say in A1#, B1#, C1#. (The arrays have same length). Let's call the value of each array respectively a, b, c.
I want to compute, for each row an operation. For instance 2*a+b+c, and extract only the rows (ie. Lines of {a_i \ b_i \ c_i}) for which 2*a+b+c = 120.
I think REDUCE is the function i should use. However i can not manage to make it work properly as the VSTACK on my accumulator is messed up.
For now I am using a filter but i wonder if there is a "cleaner way" :
My problem is the following:
I have values in dynamic arrays, let's say in A1#, B1#, C1#. (The arrays have same length). Let's call the value of each array respectively a, b, c.
I want to compute, for each row an operation. For instance 2*a+b+c, and extract only the rows (ie. Lines of {a_i \ b_i \ c_i}) for which 2*a+b+c = 120.
I think REDUCE is the function i should use. However i can not manage to make it work properly as the VSTACK on my accumulator is messed up.
For now I am using a filter but i wonder if there is a "cleaner way" :
Excel Formula:
=LET(myArr;HSTACK(A1#;A2#;A3#);
FILTER(myArr;BYROW(myArr; LAMBDA(r; CHOOSECOLS(r;1)*2+CHOOSECOLS(r;2)+CHOOSECOLS(r;3)=120))))