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.
I have tried sorting data on open office but unlike MS excel it only sorts the data in the column selected. eg: if you have data containing personal information you would not want one column sorting itself without correspondingly sorting the others associated with it. I think this is a major fault.
Posted by: yusuf turab | November 25, 2008 at 07:37 AM
Is it possible to sort by more than three criteria like it is in Excel 2007. I have test data that i need to sort by 6 or more different criteria and I hate to have to purchase Office 2007 to do it if not necessary. Thanks for any suggestions.
Posted by: Edgar Wright | December 03, 2008 at 09:32 AM
It's not possible to sort by more than three from what I'm reading...which is unfortunate as it's possible in MS....some developers say "if you need more than three switch to base" (database program). The sort feature is definitely not 100% :(
Posted by: Joel | December 17, 2008 at 11:02 AM
I know this has nothing to do with your post, but I am at a loss as to how to perform a (seemingly) simple function in OpenOffice Calc.
I have a column containing sequential dates through the year, and in the next column, in every seven cells, I would like to have a date range of the previous week listed. Does this make sense? (I've written & rewritten & rewritten AGAIN this question, and it still seems confusing.
For example:
Column A has descending days of the week listed:
Sun = cell A1
Mon = cell A2
Tues = cell A3
Wed = cell A4
Thurs = cell A5
Fri = cell A6
Sat = cell A7
(etc...)
Column B has descending dates for the whole year:
01/01/09 = cell B1
01/02/09 = cell B2
01/03/09 = cell B3
01/04/09 = cell B4
01/05/09 = cell B5
01/06/09 = cell B6
01/07/09 = cell B7
(etc...)
In Column C, I would like to have every 7th (seventh) cell hold the date range for the previous 7 cells in Column B:
01/01/09 - 01/07/09 = cell C7
......I hope this makes SOME KIND of sense to you, since I am dumbfounded on how this can be accomplished without typing our the date ranges as text throughout the entire year and for each year to come.
Thanks for your time,
--Sid
[email protected]
Posted by: Sid | January 14, 2009 at 10:20 AM
Don't just select the column, select ALL of the data you want to sort, headers included.
If you select just a column it will only sort that column.
Posted by: Sathya | April 17, 2009 at 12:13 PM
I wanted to address the comment from Sid. How do you subtract one date from another? You have a beginning date, some dates in the middle and an end date. Let's say they're in column G.
You just do the subtraction.
=ABS(G2-G9)
But
- be sure that the cell that the formula is in, is formatted as a number not a date. Format > Cells, Number tab, select Number as the format.
- And to make it a positive value, use the =ABS() formula around the subtraction to make an absolute value.
Posted by: Solveig | April 17, 2009 at 12:20 PM