1

I have a spreadsheet of multiple datasets in columns. I checked some documentation here, https://support.google.com/docs/answer/3093150, but the SORT() function would order my columns on a column-by-column basis when I want to keep pairs of columns together. The first row has axis labels and the second has dates I want to sort by.

For example, this is what I have.

A B C D E F
date2 null date3 null date1 null
1.000 .2353 1.000 .3235 1.000 .2823
2.000 .4593 2.000 .3852 2.000 .3924
3.000 .6372 3.000 .7238 3.000 .6932

But I want

E F A B C D
date1 null date2 null date3 null
1.000 .2823 1.000 .2353 1.000 .3235
2.000 .3924 2.000 .4593 2.000 .3852
3.000 .6932 3.000 .6372 3.000 .7238

where datei are now sorted.

1 Answer 1

0

SORT

if you think a result like this would suit you, this is the formula:

=transpose(sort(transpose({A1:F1;A2,A2,C2,C2,E2,E2; A3:F5}),2,1))
2
  • I worded my original question poorly. I have updated the question and example to reflect more closely on what I meant. Commented Aug 12, 2022 at 21:05
  • I changed my answer
    – Daniele
    Commented Aug 14, 2022 at 5:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.