You want to do some good, hard sorting. Not just sorting by the first column, but by perhaps the third column. Maybe you want to sort first by state, then by city, then by last name. For that, you need the Sort window under Data > Sort.
You have your data. Select all the data to sort, and either select the headings or not. You're good either way.
Choose Data > Sort.
Click the Options tab. You need to tell Calc whether you've got headings selected or not. If you've got headings selected, you want the option shown, "Range Contains Column Labels," to be selected. If you didn't, unmark it.
Now click the Sort Criteria tab. If you selected headings you'll see the headings themselves; if you didn't then you'll just see Column A, etc. Select the column to sort by, and Ascending or Descending.
Click OK.
You get your results. Here, the amounts under the column for the year 2000 are sorted in ascending order.
Now, let's look at a different set of data. You have a lot of people from the same state, and several cities per state. In this case you might want to just sort by last name, but you could also group by location. So you'd sort by state (the broadest category), then city, then alphabetically by last name. Click the image to see more detail.
Select the data, with or without headings, and choose Data > Sort. In the Options tab, be sure to select the Range Contains Column Labels option if you selected headings.
In the Sort Criteria tab, select first State, then City, then Last Name.
Click OK.
You get your results. Here's a closeup of one section, followed by the complete data. Click either to see them closeup.
This window that I've covered in this blog entry is pretty much what you need. If you want to go a little farther and sort by something else, like days of the week in the order they come, not alphabetical order, tune in for the next sorting blog.
Solveig, is there a way to help OO.o remember your sort criteria from sort to sort? I have one or two particular spreadsheets I resort every few days to every week. I've noticed that OO.o sometimes remembers what I want, and sometimes I have to respecify all the criteria. No, I haven't yet been observant enough to figure out a pattern.
Posted by: Bill Harris | September 20, 2007 at 10:23 PM
very useful tips, just what I was looking for
thanks
Posted by: OpenOffice News | September 21, 2007 at 03:33 PM
Awesome tutorial Solveig, I definetly want to do a video tutorial out of this. Expect the youtube soon.
Posted by: JZA | October 02, 2007 at 07:20 AM
Hi JZA,
Include the URL of this post, if you would. Have fun! I look forward to seeing it.
Thanks,
Solveig
Posted by: Solveig Haugland | October 03, 2007 at 11:09 AM
Hi Bill,
Sorry for the delay. I'm afraid I haven't noticed any sort of way to make OOo remember the criteria and/or what makes it do it when it does.
Solveig
Posted by: Solveig Haugland | October 03, 2007 at 11:10 AM
Hey Bill
I think that you should make a macro to automatize your work. In this way you will speed up you work significantly.
Posted by: Wojtek | December 21, 2007 at 01:43 PM
Hello Solveig,
I never had a problem sorting my data in the OO spreadsheet until recently.
Instead of the usual numeric sorting I expected, it sorted my table alphanumerically.
I didn't find where to pick the sort type criteria from,
I appreciate your help,
dave
Posted by: dave | April 05, 2009 at 02:57 AM
Hi Dave,
Select all the data and choose the headings, then choose Data > Sort and select the column to sort by. Click OK.
If that doesn't work, select the columns of numbers and choose Format > Cells, Number tab. Be sure they're the right format such as Currency or Number.
Posted by: Solveig | April 05, 2009 at 07:24 AM