[opensuse] How can I reverse the order of a table in libreoffice?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Say I have a table with the movements of an account, sorted by date, most recent on top: date concept total 2012-05-05 A 1000 2012-05-05 B 900 2012-05-04 C 800 2012-05-03 D 700 If I try to revert the order sorting by date on the first column, it may happen that the total column may be wrong, like this: 2012-05-03 D 700 2012-05-04 C 800 2012-05-05 A 1000 2012-05-05 B 900 The first column is correctly sorted by date, but the total column is wrong. What I want is an exact reversing of the order, not a sorting: 2012-05-03 D 700 2012-05-04 C 800 2012-05-05 B 900 2012-05-05 A 1000 But I have not found a "reverse" option in the menus. Did I miss it? - -- Cheers Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlHERAgACgkQtTMYHG2NR9VM9QCfTvc43u+ib5zR2/7iKrsQWwRp 3osAn3vBWp8Ry0K1HoA1rd0PbljvGR6b =yI7k -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Say I have a table with the movements of an account, sorted by date, most recent on top:
date concept total 2012-05-05 A 1000 2012-05-05 B 900 2012-05-04 C 800 2012-05-03 D 700
If I try to revert the order sorting by date on the first column, it may happen that the total column may be wrong, like this:
2012-05-03 D 700 2012-05-04 C 800 2012-05-05 A 1000 2012-05-05 B 900
The first column is correctly sorted by date, but the total column is wrong. What I want is an exact reversing of the order, not a sorting:
2012-05-03 D 700 2012-05-04 C 800 2012-05-05 B 900 2012-05-05 A 1000
But I have not found a "reverse" option in the menus. Did I miss it?
I don't know the official answer but there are at least two ways to solve it: (1) add an additional column that contains monotonically increasing integers. Reverse sort on that column. Then delete the column. (2) sort on both the date and another column In the case of your example of course you could just reverse sort on either of the other columns :) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2013-06-21 at 13:45 +0100, Dave Howorth wrote:
But I have not found a "reverse" option in the menus. Did I miss it?
I don't know the official answer but there are at least two ways to solve it:
(1) add an additional column that contains monotonically increasing integers. Reverse sort on that column. Then delete the column.
Yep. I thought of this way two minutes after posting. Usually writing a post has this effect on me, finding the answer, or an answer ;-) I added a column, first cell is 1, next is previous +1. Then copy paste values to destroy the formula, then sort by that column. I think there is another way to fill a column with consecutive numbers, but that's the way I remember. Do all that on an auxiliary sheet, copy back to original table the resulting table less the sorting column. Otherwise, add a column, number it, sort, delete column. I had been sorting by date previously, till today I noticed the numbers in the total column were wrong, ie, the entries were sorted wrong. I had to import the original data and sort again, correctly this time.
(2) sort on both the date and another column
In the case of your example of course you could just reverse sort on either of the other columns :)
Yes, right, but unreliable on an account, the "total" column goes up and down :-) - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlHETZAACgkQtTMYHG2NR9WzZwCeMlZq0dEIuB08XZ9aftnWs47m SAYAnA44gfq95MjXlG1qC2zB6U5kGZ7z =kxps -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carlos E. R. wrote:
I think there is another way to fill a column with consecutive numbers
Put 1 in a cell. Put 2 in the cell below it. Select the two cells and drag down. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2013-06-21 at 14:07 +0100, Dave Howorth wrote:
Carlos E. R. wrote:
I think there is another way to fill a column with consecutive numbers
Put 1 in a cell. Put 2 in the cell below it. Select the two cells and drag down.
Ahhhh! Much faster than mine. Thanks. I think I saw this years ago, then forgot. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlHEUrkACgkQtTMYHG2NR9VFfwCghg6qe8znc2wsXP7IDRIZ6/he KmkAnA+RdPQNK6YHKi3WzTMJFFy5SYLN =co40 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 21/06/13 13:56, Carlos E. R. wrote:
(1) add an additional column that contains monotonically increasing integers. Reverse sort on that column. Then delete the column.
Yep. I thought of this way two minutes after posting. Usually writing a post has this effect on me, finding the answer, or an answer ;-)
I added a column, first cell is 1, next is previous +1. Then copy paste values to destroy the formula, then sort by that column. I think there is another way to fill a column with consecutive numbers, but that's the way I remember. Do all that on an auxiliary sheet, copy back to original table the resulting table less the sorting column. Otherwise, add a column, number it, sort, delete column.
That's a bit of a clumsy method - if you manually enter 1, 2, 3 in the first three cells respectively, then select the three cells, you can use the drag handle lower right of the selection to extend the sequence down the column... Dx -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2013-06-21 at 14:09 +0100, Dylan wrote:
On 21/06/13 13:56, Carlos E. R. wrote:
values to destroy the formula, then sort by that column. I think there is another way to fill a column with consecutive numbers, but that's the way I remember. Do all that on an auxiliary sheet, copy back to original table the resulting table less the sorting column. Otherwise, add a column, number it, sort, delete column.
That's a bit of a clumsy method - if you manually enter 1, 2, 3 in the first three cells respectively, then select the three cells, you can use the drag handle lower right of the selection to extend the sequence down the column...
Clumsy indeed O:-) I hope to remember this other method. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlHEUwYACgkQtTMYHG2NR9VRfQCeL6nYjnhURyQMOA5MnpZEU0iE 0TIAn3wI49+2sD5wcNt7UZox0aU6ACmb =AKwb -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 21/06/13 13:16, Carlos E. R. wrote:
But I have not found a "reverse" option in the menus. Did I miss it?
I find the easiest way is to give each row an index and then sort by that index in reverse order... Dx -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Carlos E. R.
-
Dave Howorth
-
Dylan