I have a list that I made making vertically. I want to pick any point on the list - grab that and the next 4 in the list and place them horizontally in another list. I am just trying to figure out the most efficient way without adding complexity. Here is the list:
And this is what I want the output to be (with the choice of F):
I have been tried to figure out how to do it with an index-match and with a vlookup and it just becomes to complex because I add so much to make it work.
CodePudding user response:
You can try the following in cell D2
:
=TOROW(INDEX(A2:A18, SEQUENCE(5,,XMATCH(B1, A2:A18))))
or using LET
to avoid repetition:
=LET(x, A2:A18, TOROW(INDEX(x, SEQUENCE(5,,XMATCH(B1, x)))))