Thursday, November 3, 2022

[FIXED] How to flip a range horizontally?

Issue

I have this google sheets input table
How to flip the range A2:E range horizontally with Arrayformula because the range A1:E is growing.

Input                   Output              
c   a   t                       t   a   c
b   i   r   d               d   r   i   b
h   o   r   s   e       e   s   r   o   h
t   i   g   e   r       r   e   g   i   t

Solution

The old way

=TRANSPOSE(SORT(TRANSPOSE(A2:E),SEQUENCE(ROWS(
                TRANSPOSE(A2:E))),0))

enter image description here

The new way

=LAMBDA(range,
 TRANSPOSE(SORT(range,SEQUENCE(ROWS(range)),0)))(TRANSPOSE(A2:E))

enter image description here

Used formulas help
TRANSPOSE - SORT - SEQUENCE - ROWS - LAMBDA



Answered By - Osm
Answer Checked By - Terry (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.