Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Rotate table based on drop down input

Data

I have a table B3:F7 with a changing range, more or less rows and columns.

Objective

I want to Rotate the original table using the input from the drop down I2:M2 to get the result like 90, 180, 270 Rotation.

To clarify

  • I don’t want to choose between them; I want the original table to be Rotated according to the input of the dropdown. I have only the original table and the data is mixed and the range is growing.
  • The formatting is for demonstration only.

Progress

I tried transpose twice =TRANSPOSE(TRANSPOSE(B3:F7)) to get 180 result, but the output is reverted back to the original form B3:F7.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Sources

Make a copy


enter image description here

>Solution :

try:

=ARRAYFORMULA(IF(I2=O3, B3:F7, 
 IF(I2=O4, TRANSPOSE(SORT(B3:F7, ROW(B3:F7), 0)),
 IF(I2=O5, TRANSPOSE(SORT(TRANSPOSE(SORT(B3:F7, ROW(B3:F7), 0)), ROW(B3:F7), 0)),
 IF(I2=O6, SORT(TRANSPOSE(B3:F7), ROW(B3:F7), 0), )))))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading